[R] trying to build matrix for tests...
Jeff D. Hamann
jeff_hamann at hamanndonald.com
Thu Feb 28 18:07:32 CET 2002
Okay, I stumped. I'm trying to build a matrix or data.frame that consists of
values by group. For example,
resid, group
574 0.536196370873122 E
575 0.93191093696265 E
576 -1.27116094894117 A
577 -1.05159666055027 A
578 0.398273458301184 D
579 0.586373126102573 E
580 0.806575304513802 E
581 0.897258393118338 E
582 0.342393324256838 D
583 0.781245511773227 E
I can get the values without the quotes, but when I try to use the matrix I
get errors like,
Error in "colnames<-"(*tmp*, value = c("resid", "group")) :
attempt to set an attribute on NULL
and
> attach( rt )
Error in attach(rt) : attach only works for lists and data frames
the code that I use to build the matrix is :
# break up the classes into cats and test for departure from zero
signif <- symnum(fit3sls[[2]]$residuals,
corr = FALSE,
na = FALSE,
cutpoints = c(-5,.1,.2,.3,.4, 5),
symbols = c("A","B","C","D","E"))
rt <- noquote( cbind( fit3sls[[2]]$residuals, signif ) )
colnames(table) <- c("resid","group")
boxplot( resid ~ signif, data = rt )
which doesn't work. What do I need to do when building the matrix to make it
usable as a data set.
Thanks,
jeff.
Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
jeff_hamann at hamanndonald.com
www.hamanndonald.com
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list