Re: [R] install packages automatically

2007-09-10 Thread Ross Darnell
Try ?update.packages Ross Darnell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wensui Liu Sent: Tuesday, 11 September 2007 11:45 AM To: r-help@stat.math.ethz.ch Subject: [R] install packages automatically Dear Listers, I am a little tired of

Re: [R] lattice panel.lmline problem

2007-09-10 Thread Ross Darnell
Thanks Frede I didn't know about the "r" type. Ross Darnell -Original Message- From: Frede Aakmann Tøgersen [mailto:[EMAIL PROTECTED] Sent: Mon 10-Sep-07 4:45 PM To: Ross Darnell; r-help@stat.math.ethz.ch Subject: SV: [R] lattice panel.lmline problem Why not use

[R] lattice panel.lmline problem

2007-09-09 Thread Ross Darnell
the last line without the "if" statement which obviously means it's ignored. Of course I may be taking the wrong tack completely to get the result I need. Any advice would be appreciated Ross Darnell [[alternative HTML version deleted]] __

Re: [R] Question on graphs and simple if statements

2007-09-02 Thread Ross Darnell
The answer to your first question is curve(ifelse((x>-1)&(x<1),x^2+1,x+2),from=-10,to=10) Sorry I cannot understand the next part of your query. Ross Darnell On Sun, 2007-09-02 at 00:31 -0700, JHawk3 wrote: > Hi all, > > I'm a relatively new user to the R interface,

Re: [R] customizing the color and point shape for each line drawn using lattice's xyplot

2007-08-30 Thread Ross Darnell
Then you can regenerate the factor by common.without.Method4 <- subset(common, Method!=4) common.without.Method4 <- transform(common.without.Method4, Method = factor(Method)) Ross Darnell -Original Message- From:

Re: [R] customizing the color and point shape for each line drawn using lattice's xyplot

2007-08-30 Thread Ross Darnell
Does this help common.without.Method4 <- subset(common, Method!=4) xyplot(MeanBxg ~ PercentVarExplained | bdg.f * bdx.f, data=common.without.Method4, groups=Method.f, type="l", auto.key=T) Ross Darnell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: [R] Conditional subsetting

2007-08-07 Thread Ross Darnell
osest to 12pm? Perhaps for condition 2 for a animal which.min(time-1200) (replace 1200 with properly defined timestamp representing 12:00pm) Ross Darnell -Original Message- From: [EMAIL PROTECTED] on behalf of Tim Sippel Sent: Wed 08-Aug-07 9:37 AM To: r-help@stat.math.ethz.ch Su

Re: [R] problem with reading data files with different numbers of lines to skips

2007-08-02 Thread Ross Darnell
You could read the file and test each line (try readline()) but you need some rule to distinguish between text lines and data lines. You could then reread the file with the number of skip lines defined. Ross Darnell -Original Message- From: [EMAIL PROTECTED] on behalf of Tom Cohen

Re: [R] Convert string to list?

2007-07-26 Thread Ross Darnell
Manuel Jim's may be what you want-- a list of numerics with names P, T and Q or a list of character strings? > str <- "P = 0.0, T = 0.0, Q = 0.0" > str(as.vector(unlist(strsplit(str,",")),mode="list")) List of 3 $ : chr "P = 0.0" $ : chr " T = 0.0" $ : chr " Q = 0.0" -Original Message-

Re: [R] Convert string to list?

2007-07-26 Thread Ross Darnell
Is this what your want? as.vector(unlist(strsplit(str,",")),mode="list") Ross Darnell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Manuel Morales Sent: Friday, 27 July 2007 10:39 AM To: r-help Subject: [R] Convert string to lis

Re: [R] questions on lme function

2007-07-04 Thread Dr Ross Darnell
Ana You are estimating a random coefficient model on 5 individuals (mean and variance). Are you sure this is wise? Ross Darnell - Original Message - From: Ana Conesa <[EMAIL PROTECTED]> Date: Thursday, July 5, 2007 1:21 am Subject: [R] questions on lme function > > Dear

Re: [R] Log-likelihood function

2007-05-02 Thread Ross Darnell
Alternatively generate the log-likelihood using the sum(dpois(y, fitted(model), log = TRUE)) Regards Ross Darnell Doxastic wrote: > > You're right. I do need to learn more. I never learned null/residual > deviance. I know the deviance is equivalent to an anova decompostio

[R] Lattice plots of the form xyplot(y1+y2~x)

2006-11-17 Thread Ross Darnell
I would appreciate help trying to set different plot types in a lattice plot with multiple responses e.g. xyplot(y+fval~x) but have "y" as points and "fval" as a line. I have tried xyplot(y+fval~x,type=c("p","l")) but this results in both plots

[R] MASS4 page 360 cumulative hazard plot

2006-10-15 Thread Ross Darnell
I cannot reproduce Fig. 13.2 in MASS4. > plot(gehan.surv,fun='cloglog') Warning message: 2 x values <= 0 omitted from logarithmic plot in: xy.coords(x, y, xlabel, ylabel, log) and the x-axis is badly scaled. I was wondering if someone can help Rega

Re: [R] Sweave and the "[" function

2006-09-05 Thread Ross Darnell
Hi Vincent This would seem logical but in this case doesn't work. It doesn't seem to be a Sweave problem (feature) at all but within R as Hadley stated. Within R try > quote(women[1]) women[1] now try > quote("["(women,1)) women[1] So it's parsed and "normalised" (there's a familiar term);

[R] Sweave and the "[" function

2006-09-04 Thread Ross Darnell
I am wanting to use the "[" operator in an S-chunk, e.g. <<>>= str(women) women$height women[,1] "["(women,1) @ to show the equivalence of three methods of extracting an element from a data.frame. However Sweave returns the last of these as women[1] in the S input chunk How can I force it

[R] Lattice plot of multiply-nested data

2006-05-09 Thread Ross Darnell
described. I would appreciate any suggestions Ross Darnell University of Queensland __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Coefficients for aliased models

2006-04-24 Thread Ross Darnell
,"X","Xcopy") model <- lm(y~X+Xcopy,data=Xnew) coef(model) # reports NA for Xcopy estimate summary(model) # ditto coef(summary(model)) # drops NA for Xcopy estimate Is this intentional? Is there a way of extracting the coefficient table from the summary output with the aliased

[R] Calculation of r.squared for linear model with offset

2006-04-09 Thread Ross Darnell
es 0 when it should (IMHO and a few others perhaps) be 1 - RSS/TSS(corrected for the mean only) RSS = sum(resid(my.model)^2) TSS = sum((y-mean(y))^2) Have I missed this somewhere in the FAQ's or elsewhere? Regards Ross Darnell __ R-help@stat.math.e

[R] Sweave: How can I include S input in paragraph mode

2005-12-01 Thread Ross Darnell
Sweavers As the title suggests I would appreciate any help to include S code in ordinary paragraph mode. I can use the textsl font but is isn't the same. Thanks Ross Darnell __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/ma

[R] Translating lme model call to lme4

2005-09-12 Thread Ross Darnell
I would appreciate help translating the following lme model to an lmer function. lme(lognrms ~ Group*Rotation*muscle*side*support*arms, random=~1|Subject/Stratum2/rep, data=Data) Many thanks Ross Darnell [EMAIL PROTECTED] __ R

[R] anova.lmlist output change

2005-07-13 Thread Ross Darnell
R-colleagues I have adapted the anova.lmlist function to use the model object name as the first column in the output instead of the string "Model n". If there is general agreement can the change be implemented into the stats package? Regards Ross Darnell -- University of

Re: [R] A suggestion for predict function(s)

2005-04-13 Thread Ross Darnell
necessarily the same as the original data frame. You need a bit more work to get the right model.matrix that correspond to the newdata. It's not clear to me whether you want to return model matrix or model frame, but in either case it's not sufficient to just use `newdata'. Andy Fro

[R] A suggestion for predict function(s)

2005-04-12 Thread Ross Darnell
fit <- napredict(na.act, fit) se.fit <- napredict(na.act, se.fit) } predictors <- if (missing(newdata)) model.matrix(object) else newdata pred <- list(predictors=predictors, fit = fit, se.fit = se.fit, residual.scale = residual.scale) }

[R] Histogram without common borders

2004-07-19 Thread Ross Darnell
Is it possible to produce a histogram directly using the hist() function with the common borders removed? It can be done by plotting the histogram object using type 's'teps. my.hist <- hist(x,plot=FALSE) plot(my.hist$breaks,c(0,my.hist$counts),type='s') I would apprec

[R] WinMenu's question

2004-06-01 Thread Ross Darnell
#x27;EMG/Graphics')) try(winMenuDel("EMG")) winMenuAdd("EMG") winMenuAdd("EMG/Graphics") winMenuAddItem("EMG/Graphics","Plot trace","plot.trace()") } "plot.trace" <- function(){ x <- eval(parse(text=trace.dialog(

[R] Frequent crash printing graphics windows and wavethresh

2003-12-08 Thread Ross Darnell
ng if anyone else is experiencing this problem Regards Ross Darnell -- University of Queensland, Brisbane QLD 4067 AUSTRALIA Email: <[EMAIL PROTECTED]> __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] help with nomogram function

2003-11-06 Thread Ross Darnell
Frank Harrell wrote > On Wed, 05 Nov 2003 09:22:34 +1000 > Ross Darnell <[EMAIL PROTECTED]> wrote: > > > I have fitted a logistic regression model > > > > > failed.lr2$call > > lrm(formula = failed ~ Age + task2 + Age:task2, data = time.long, >

[R] help with nomogram function

2003-11-04 Thread Ross Darnell
variable Age does not have limits defined by datadist > I get an error. The NA values in ddist seem to be the problem but I don't understand the datadist information. Can anyone help explain why this is failing. Thanks Ross Darnell -- University of Queensland, Brisbane QLD

[R] R workshop, Qld Australia

2003-08-06 Thread Ross Darnell
interested in attending can find out more by looking at http://www.sci.usq.edu.au/staff/dunn/qstatconf/workshops.html -- Ross Darnell Organising committee Email: <[EMAIL PROTECTED]> __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/m

Re: [R] Specifying an lme model

2003-07-15 Thread Ross Darnell
-subject variance. Many thanks Ross Douglas Bates <[EMAIL PROTECTED]> writes: > Ross Darnell <[EMAIL PROTECTED]> writes: > >> I would like some advice on how if possible, to test the following >> >> I have subjects each measured several times. The subjects a

[R] Specifying an lme model

2003-07-14 Thread Ross Darnell
lme0 <- lme(y~group,random=~1|subject) I did think that the model that defined a specific between-subject variance for each group was update(lme0,.~., weights=varIdent(form=~1|group)) but I am not sure. I would appreciate any help. Ross Darnell

RE: [R] equivalence test

2003-06-26 Thread Ross Darnell
qnorm(beta/2))^2 s = standard deviation delta = clinically important difference alpha = Type I error beta = Type II error -- Ross Darnell __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] RE: Simple NLME problem (I hope)

2003-03-27 Thread Ross Darnell
her random >effects. >Looking forward to your help. It may be that you want to use the "weights=varIdent(form=~1|groups)" argument which will fit a variance for each level of the groups factor. -- Ross Darnell School of Health and Rehabilitation Sciences University of Queensla

[R] Re: Finding missing data patterns

2003-02-02 Thread Ross Darnell
The norm package of Joe Schafer can be used. It has a function called 'prelim' (or very similar) that does this. Regards Ross Darnell Email: <[EMAIL PROTECTED]> __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] tkmenu question

2003-01-29 Thread Ross Darnell
? 2. Why does the toplevel frame shrink if though I define the width of the menubar frame and set the fill="x"? Thanks Ross Darnell -- Email: <[EMAIL PROTECTED]> require(tcltk) || stop("tcltk support is absent") # Generate the main frame .fr <- tktoplevel(widt

[R] Searching for glmmNQ

2003-01-07 Thread Ross Darnell
I cannot find the glmmNQ function in the MASS package (or anywhere else I have tried) mentioned on page 296 of MASS4. I would appreciate directions. Thanks -- Ross Darnell __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman