Re: [R] multiple column argument in formula (MASS:lda)

2009-12-01 Thread Wai-Kuan Yip
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

[R] multiple column argument in formula (MASS:lda)

2009-11-30 Thread marcos carvajalino
Dear R Help team, I'm having some problems running a discriminant analysis (MASS:lda) over my data, i have a grouping variable coming from a previous cluster analysis and several discriminators (78 actually). I'm trying to run lda using column index as independent variable in the formula like