[R] Factors.
Uwe Ligges
ligges at statistik.uni-dortmund.de
Wed Jul 7 09:15:44 CEST 2004
[last week,] assuncao.senra at portugalmail.com wrote:
> Hello,
>
> I'm new with R. I need some help; I have a matrix of data to wich i want to
> apply the function dudi.acm to perform multiple correspondence analysis.
> However to use it all variables must be factors, so how can i turn each column
> of the matrix into a factor? I've tried as.factor. It works isolated for each
> column, but when I form the matrix of all factors it doesnt work.
> Please help me!
>
[Looks like there was no answer until now.]
a) Please tell us which package the functions you are using are in (I
know, it is ade4).
b) Please follow the posting guide which tells you some more things
(which are not *that* important here).
c) Please read the help page! ?dudi.acm tells you
"df, df1, df2: data frames containing only factors"
^^^^^^^^^^^
You cannot have a matrix of factors, because the required attributes
cannot be set for each column separately. Instead, use a data.frame.
Uwe Ligges
More information about the R-help
mailing list