[R] how to make the matrix as factors
ys03165003@student.ecnu.edu.cn
ys03165003 at student.ecnu.edu.cn
Sun Dec 19 09:00:45 CET 2004
Hi All,
Thanks for you help, I have loaded the library MASS to call the mca. But when I
want to do the mca, there is another problem, for example
--------
--------
> leaf <- read.table("C:/Documents and Settings/wxh-c/ÃÃÃæ/1.txt",
+ col.names=c("size","texture"),header=TRUE)
> leaf
size texture
1 3 3
2 2 2
3 3 2
4 3 2
5 3 2
6 3 3
7 3 2
8 3 2
9 3 2
> attach(leaf)
> require(MASS)
Loading required package: MASS
[1] TRUE
> new.mca <- mca(leaf)
Error in mca(leaf) : All variables must be factors
---------
So, what should I do to make the matrix as factor. Waiting for you answers.
Thanks!
jeff
More information about the R-help
mailing list