[R] multiple column argument in formula (MASS:lda)
Wai-Kuan Yip
waikuan.yip at gmail.com
Tue Dec 1 03:58:22 CET 2009
Hello Marcos,
When you use paste(.), it will return a String, and the first argument of
lda(.) does not read a string as formula.
>lda(Grupo~paste(names(cien[,3:80]),collapse="+"),data=cien)
Here's what I'd do:
colIndex <- c(1,2,4,5,...) #what ever index of your input data set that you
want to use as variables
#I presume Grupo is the class column (col=3)?
lda(cien[,colIndex], cien[,3])
Hope this helps..
Wai-Kuan Yip
http://www.deakin.edu.au/~waiyip http://www.deakin.edu.au/~waiyip
--
View this message in context: http://n4.nabble.com/multiple-column-argument-in-formula-MASS-lda-tp931285p931814.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list