r(substitute(my.x)) to
pass
the name - but deparse(substitute(my.x)) also works. Is there any
reason to prefer one over the other?
Thank you ...
Peter Alspach
__
The contents of this e-mail are privileged and/or confidential to t
rationale behind the choice of lexical scoping for R. Roger
Peng showed how to modify fnB. Brian Ripley suggested that it is
generally better to pass functions an object rather than just the name,
and warned of the dangers of using get() on the result of
deparse(substitute()).
Thanks all
Peter
(lm(S~rep+trt1*trt2*trt3, data=dummy.data), type='terms', se=T)
or
predict(glm(cbind(S, 100-S)~rep+trt1*trt2*trt3, data=dummy.data, family='binomial'),
type='terms', se=T)
or, as in my case,
predict(glm(cbind(S, 100-S)~rep+trt1*trt2*trt3, data=dummy.data,
family=
ives the
same standard errors as predict(temp.lm, se=T); i.e. those of the predicted values.
Regards ....
Peter Alspach
>>> "Roger D. Peng" <[EMAIL PROTECTED]> 03/08/04 12:22:44 >>>
Try summary(glm.object)$coefficients.
-roger
Peter Alspach wrote:
> K
$df
[1] 23
$residual.scale
[1] 14.59899
Whereas from the analysis of variance table we can get the standard error of the mean
for trt1 as being sqrt(anova(temp.lm)[9,3]/12) = 4.214365. It is the equivalent of
this latter value that I'm after in the glm() case.
>>> Prof Brian Ri
k r s p l u z j x d q f
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Sébastien
> Sent: Wednesday, 29 August 2007 9:00 a.m.
> To: Gabor Grothendieck
> Cc: R-help
> Subject: Re: [R] Factor levels
>
>
2 3 4 5 6 7 8 9 10 11
0 2 4 6 8 10 12 14 16 18 20
Cheers .
Peter Alspach
>>> Gabor Grothendieck <[EMAIL PROTECTED]> 01/06/05 09:00:15 >>>
On 5/31/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Excuse the simple question...
> I'
Ben
Others have pointed out plotmath. However, for some superscripts (including 2)
it may be easier to use the appropriate escape sequence (at in Windows):
ylab = 'BA (m\262/ha)'
Cheers ....
Peter Alspach
>>> "Benjamin M. Osborne" <[EMAIL PROTECTED]&g
Tian
Bill Venables wrote an excellent explanation to the S list back in 1997.
I saved it as a pdf file and attach it herewith ...
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of T Mu
> Sent: Thursday, 17 August 2
Tian
It appears the attachment might not have worked so I'll embed Bill's
message at the end.
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Peter Alspach
> Sent: Thursday, 17 August 2006 8:02 a.m.
> To: T
Dean
Try:
plot(c(-0.25,18),c(0, max(patient10)),type="n", ylab="SD of POST
estimator", xlab="")
title(xlab='Scans\n(a)', line=3)
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of [E
h(emmanuel), 1)
if (startPos==1) newEmm else
newEmm[c(startPos:length(newEmm),1:(startPos-1))]
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Emmanuel Levy
> Sent: Friday, 20 April 2007 1:03 p.m.
> To: r-help@stat.math.et
aechler wrote:
>>>>>> "Peter" == Peter Alspach
>>>>>> on Tue, 14 Jun 2005 14:11:47 +1200 writes:
>
> Peter> Ben
>
> Peter> Others have pointed out plotmath. However, for some
> Peter> superscripts (including 2) it may be easier to use
> P
Carlos
?mca states that mca works on a dataframe. As you've written it
is.data.frame(de) returns FALSE
Try
de <- data.frame(d,e) instead of de <- factor(c(d,e))
HTH
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
but model.tables() still did not (but that could have
been my error). However, se.contrast() worked.
Cheers
Peter Alspach
>>> Damián Cirelli <[EMAIL PROTECTED]> 02/12/04 09:50:13 >>>
Hi all,
I'm new to R and have the following problem:
I have a 2 factor des
Tobias
I remember finding Patrick Burns' "S Poetry" (see http://www.burns-stat.com/ )
worth reading - and it covers this sort of thing nicely.
Peter Alspach
>>> Tobias Muhlhofer <[EMAIL PROTECTED]> 02/12/04 13:57:47 >>>
Thanks.
The problem is that the
ain that this
question has been asked and answered recently. However, I can find no trace of
it in the mail archives (although I have spent several hours reading lots of
other interesting things :-)).
Thanks .....
Peter Alspach
__
The con
Lorin
You could use rle(): Say your Activity and Interval data is in lorin, then:
tmp.rle <- rle(as.vector(lorin[,1]))[[1]]
tapply(lorin[,2], rep(1:length(tmp.rle), tmp.rle), sum)
1 2 3
16 8 6
HTH
Peter Alspach
>>> Lorin Hochstein <[EMAIL PROTECTED]> 24/02/05 16:1
at[dat[,4]=='POR',5]
dat[,4] <- as.factor(dat[,4])
dat[,5] <- as.factor(dat[,5])
Peter Alspach
>>> "F Z" <[EMAIL PROTECTED]> 29/10/04 12:48:54 >>>
Hi
I have a data.frame with dim = 18638 (rows) 6 (cols)
names(dat)
[1] "id"
Kjetil
Isn't a data.frame as special type of list, and thus one could use
as.data.frame?
Peter Alspach
>>> Kjetil Brinchmann Halvorsen <[EMAIL PROTECTED]> 29/10/04
14:16:03 >>>
I found the need of converting a matrix into a list of its columns
(for use with do.c
Jon
One way: assuming your data.frame is 'jon'
aggregate(jon[,2], list(jon[,1]), function(x)
levels(x)[which.max(table(x))])
Group.1 x
1 Plot1 big
2 Plot2 small
3 Plot3 small
HTH ....
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
Kirsten
One way to do this:
kirsten <- c(123, 1234, 12345)
100*as.numeric(paste(substring(kirsten, 1, 3), substring(kirsten, 4, 5),
sep='.'))
HTH ....
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf O
o do what I described above ?
Use subsetting to identify that substances, and then !(...%in%...) to
remove records with these substances:
yourData[!(yourData$substance %in% yourData[yourData$id==3 &
yourData$y>=4, 'substance']),]
The above is untested and will need modif
Julien
This is quite a common question. Within R, try
RSiteSearch('one good book for R')
and follow the threads ......
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Julien Barnier
> Sent: Monday, 26
Check out which.max
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of bunny
> , lautloscrew.com
> Sent: Thursday, 8 March 2007 11:20 a.m.
> To: R-help@stat.math.ethz.ch
> Subject: Re: [R] hwo ca
[1] "XG1" "YG1" "XEST" "YEST" "XNOEMP1" "XNOEMP2"
[7] "YNOEMP1" "YNOEMP2" "XBUS10" "XBUS10A" "XBUS10B" "XBUS10C"
[13] "YBUS10" "YBUS10A" &
mes 90
> degrees, it would probably fit a lot more.
Is this the sort of thing you mean:
temp <- barplot(rnorm(16, 3))
text(temp, rep(-0.2, 16), paste('trt', 1:16), srt=90, adj=1)
Peter Alspach
> or maybe i can use space to make the horizontal width longer
> ? I looed up
Gorka
See the message from Brian Ripley, which is the first item from
RSiteSearch('R-squared')
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Gorka Merino
> Sent: Friday, 10 November 2006 4:54 a.m.
> To:
Michael
One solution:
df<-data.frame(loc=c("A","B","A","A","A"),
year=c(1970,1970,1970,1976,1980))
df[,3] <- cut(df$year, c(1969.5,1974.5,1979.5,1984.5),
c('1970-74','1975-79','1980-85'))
with(df, ad
ude a title on each plot so that I can
> recognize which plot goes with which decile but I don't know
> how to do that basically because I can't figure out what
> lapply is looping over by number. I definitely looked around
> in various R books but I
Ross
I think you want
?expand.grid
BTW, help.search('grid') finds this.
Cheers ......
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Ross Boylan
> Sent: Friday, 8 December 2006 8:03 a.m.
> To: r-hel
31 matches
Mail list logo