Re: [R] regsubsets {leaps}

2011-02-22 Thread fgg
I've tried grouping the real and imaginary parts as a single complex number, e.g. > z1 <- complex(real=r1, imaginary=i1) Although complex variables are not allowed in lm, I can run regsubsets just fine: > z <- cbind(z1, z2, z3, ..., z10) > bestsubs <- regsubsets(z, y, nbest=1, nvmax=5, intercep

[R] regsubsets {leaps}

2011-02-21 Thread fgg
Hi, I'd like to run regsubsets for model selection by exhaustive search. I have a list with 20 potential explanatory variables, which represent the real and the imaginary parts of 10 "kinds" of complex numbers: x <- list(r1=r1, r2=r2, r3=r3, ..., r10=r10, i1=i1, i2=i2, i3=i3, ..., i10=i10) Is

Re: [R] superscript

2011-02-01 Thread fgg
This works: as.expression(c(bquote(...),bquote(...))) -- View this message in context: http://r.789695.n4.nabble.com/superscript-tp3252881p3253145.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list http

Re: [R] superscript

2011-02-01 Thread fgg
Thanks, jthetzel. That works. Can you plot a legend with 2 lines using bquote? e.g. r^2 = x rmse = y "," and "\n" don't seem to work. -- View this message in context: http://r.789695.n4.nabble.com/superscript-tp3252881p3253088.html Sent from the R help mailing list archive at Nabble.com.

[R] superscript

2011-02-01 Thread fgg
Hi there, How can I superscript the "2" of "r2 =..." in the legend below? legend(210, 110, paste("r2 = ", format(summary(regression)$adj.r.squared,digits=3), sep="")) I usually use "expression(paste(...", but it won't work this time because "format(summary(..." needs to be evaluated. Thank