Jinsong Zhao wrote:
>
>
> On 2022/12/13 18:02, Martin Maechler wrote:
> >>>>>> Jinsong Zhao
> >>>>>> on Tue, 13 Dec 2022 17:07:00 +0800 writes:
> > > I don
> >
> > > On 2022/12/13 10:13, Derek Ogle wrote
bgroup() from plotmath does not render properly for me. For example
plot(0,xlim=c(0,1),ylim=c(0,1))
text(0.3,0.5,expression(bgroup('(',atop(x,y),')')))
text(0.7,0.5,expression(group('(',atop(x,y),')')))
and
library(ggplot2)
ggplot(mtcars, aes(wt, mpg)) +
annotate("text", x=2.5, y=25, label="bg
I agree with, support, and appreciate this message. Thank you Ryan for the
courage to write this, and Lainey for your courage to persist with your
question.
-Original Message-
From: R-help On Behalf Of Ryan Novosielski
Sent: Tuesday, November 17, 2020 9:40 AM
To: r-help mailing list
Cc
I am developing an application that opens an image in a new window using, at
times, windows(). I don't want the user to be able to resize the window (and
distort the image). The new window contains a menu item called "resize" that
contains three options - "R mode", "Fit to window", and "Fixed si
I have successfully used the digitize package for this purpose ...
http://cran.r-project.org/web/packages/digitize/index.html
wrote:
>
> I want to take some published graphs and digitise them to allow me to
> run some analysis on them.
> Is this possible using any of R's
> plugins. I don't thi
Is there a function similar to pkgDepends() that returns the packages that a
particular package imports or imports from? I believe I can get this
information from the matrix returned from installed.packages() but something
like pkgDepends() would be more convenient.
I did not find anything use
Mike,
Without completely knowing your end game with these questions and this
procedure it does seem like you are "re-inventing the wheel" here. If that is
true and given the nls() fit that you are using I would suggest that you look
at boot.case() in the alr3 package or nlsBoot() in the nlstoo
e,c(1,1,2))
$a
[1] 7
$b
[1] 3
$c
[1] 1 1
From: Dennis Murphy [mailto:djmu...@gmail.com]
Sent: Saturday, September 18, 2010 8:25 PM
To: Derek Ogle
Cc: R (r-help@R-project.org)
Subject: Re: [R] Repeating values in a list
Hi:
How about
> have <- list(a=7,b=3,c=1)
> lapply(have, rep, 2
I have a list that looks like this ...
> have <- list(a=7,b=3,c=1)
> have
$a
[1] 7
$b
[1] 3
$c
[1] 1
and I want to have a simple way to change it to the following without re-typing
the values ...
> desire <- list(a=c(7,7),b=c(3,3),c=c(1,1))
> desire
$a
[1] 7 7
$b
[1] 3 3
$c
[1] 1 1
In othe
Patrick,
See all(). For example,
> all(c(1,2,3)==c(1,2,3))
[1] TRUE
> all(c(1,2,3)==c(2,1,3))
[1] FALSE
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Downey, Patrick
> Sent: Friday, August 13, 2010 1:49 PM
> To: r-help@r
Have a look at lmList() in the nlme package.
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of JesperHybel
> Sent: Friday, August 13, 2010 7:56 AM
> To: r-help@r-project.org
> Subject: Re: [R] Linear regression on several groups
Gabor ... that worked perfectly. Thank you.
> -Original Message-
> From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
> Sent: Monday, August 09, 2010 10:20 PM
> To: Derek Ogle
> Cc: R (r-help@R-project.org)
> Subject: Re: [R] Function to Define a Function
>
I am trying to define a general R function that has a function as the output
that depends on the user's input arguments (this may make more sense by looking
at the toy example below). My real use for this type of code is to allow a
user to choose from many parameterizations of the same general
A.Z.,
You could recreate the data (I assumed that the values are discrete integers
and not a bin for a continuous variable) ...
value <- 1:6
count <- c(10,8,12,9,14,7)
d <- rep(value,count)
table(d)
... and then do what you want with the data in the d vector ...
summary(d)
hist(d)
> On 07-J
11:52 PM
> To: Ravi Varadhan
> Cc: Derek Ogle; R (r-help@R-project.org)
> Subject: Re: [R] optim() not finding optimal values
>
> A slightly better scaling is the following:
>
> par.scale <- c(1.e06, 1.e06, 1.e-05, 1) # "q" is scaled differently
>
> >
I am trying to use optim() to minimize a sum-of-squared deviations function
based upon four parameters. The basic function is defined as ...
SPsse <- function(par,B,CPE,SSE.only=TRUE) {
n <- length(B) # get number of years of data
B0 <- par["B0"]
n Ritz [mailto:r...@life.ku.dk]
> Sent: Saturday, April 17, 2010 2:45 PM
> To: Derek Ogle
> Cc: r-help@r-project.org
> Subject: Re: [R] piecewise nls?
>
> Hi Derek,
>
> have a look at the following made-up example:
>
> f1 <- function(x){2*x}
> f2 <- function(x
I am looking into fitting a so-called double von Bertalanffy function to fish
length-at-age data. Attempting to simplify the situation, the model looks like
this ...
Y ~ f(X; a,b,c) if x < Z
Y ~ g(X; a,d,e) if x >= Z
where
* f and g are non-linear functions (the "traditional" "single" von Be
Hello,
I am creating PDF handouts using Sweave for a beginner's R workshop. I want to
include the R code for the handout in an appendix as described (using the
listings LaTeX package) as described in ...
http://n4.nabble.com/including-Sweave-tangled-code-in-Rnw-document-tp875112p875112.html
W
I used R and the quantreg package in a manuscript that is currently in
the proofs stage. I cited both R and quantreg as suggested by
citation() and noted the version of R and quantreg that I used in the
main text as
"All tests were computed with the R v2.9.0 statistical programming
language
I have found Sweave() to be great for producing PDF documents. I have
been experimenting with RweaveHTML (from the R2HTML) package and have
had moderate success. My main issue has been that I simply want the R
output to be shown verbatim in the HTML document but RweaveHTML tends to
convert most o
Jim and Dieter,
Thank you for the quick reply and precise fix. My plot now works as
expected. Thanks again.
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Jim Lemon
> Sent: Monday, April 20, 2009 4:21 AM
> To: dieter.me..
I am attempting to create a plot with intervals "stretched" in the
x-direction using plotCI() in the plotrix package. The same data
provides an appropriate set of intervals when "stretched" in the
y-direction but I only get a lower interval when "stretched" in the
x-direction.
The data are as
Sorry for posting this twice, but I still have not solved this problem
and am hoping for some assistance.
I am attempting to write a function that is flexible enough to respond
to the user providing a formula (with a data= argument) or not (similar
to plot(x,y) versus plot(y~x,data=data)). I h
and accurate answer.
-Original Message-
From: r...@quantide.com [mailto:r...@quantide.com]
Sent: Friday, January 23, 2009 9:25 AM
To: Derek Ogle
Cc: r-h...@stat.math.ethz.ch
Subject: Re: [R] Table Modification
If I understood propelly
> tapply(fact3, list(fact1, fact2) , pa
I am trying to construct a two-way table where, instead of printing the
two-way frequencies in the table, I would like to print the values of a
third variable that correspond to the frequencies.
For example, the following is easily constructed in R
> fact1 <- factor(sample(LETTERS[1:3],10,r
Bertolt,
The points you send to polygon() do not fully enclose the area you desire. Try
adding one more point as such
xt <- c(x[(length(x)-cutpoint):length(x)],linepos)
yt <- c(y[(length(y)-cutpoint):length(y)],0)
polygon(xt, yt, density = 10 )
-Original Message-
From: [EMAIL PROTECTE
I have two packages that I use locally and have been curious about moving them
to "R Forge" to take advantage of SVN, builds, etc. In looking into this I
stumbled across two different sites. The apparent official "R Forge" site at
http://r-forge.r-project.org/ and a seemingly "unofficial" sit
For pedagogical reasons (i.e., moving a way from tables of distributions) I
want to plot a probability density or distribution function with a shaded area
corresponding to the calculated value or user input. For example, I want a
plot to visually demonstrate the result of
pnorm(1.3)
I have
Hello,
I am attempting to fit a non-linear model (Von Bertalanffy growth model)
to fish length-at-age data with the purpose of determining if any of the
three parameters differ between male and female fish. I believe that I
can successfully accomplish this goal assuming an additive error
struc
Hello all,
I am attempting to use the seq() function to define breaks for the cut()
function but am finding performance that I do not understand. The root of my
problem appears to be contained in the following simple example.
> brks <- seq(0.8,1.2,0.1)
> brks
[1] 0.8 0.9 1.0 1.1 1.2
> brks==1.
31 matches
Mail list logo