[R] Forumla format?

2009-07-27 Thread Noah Silverman
Hi, Quick question. I'm working on training an SVM. I have a dataframe with about 50 columns. I want to train on 46 of them. Is there a way to say All except columns 22,23,25 and 31? It would be nice to not have to do +c1 +c2 +c3 +c4, etc for all 48 columns. Thanks! -N

Re: [R] Forumla format?

2009-07-27 Thread Steve Lianoglou
Hi, On Jul 27, 2009, at 3:01 PM, Noah Silverman wrote: Hi, Quick question. I'm working on training an SVM. I have a dataframe with about 50 columns. I want to train on 46 of them. Is there a way to say All except columns 22,23,25 and 31? Assume your dataframe is called my.data:

Re: [R] Forumla format?

2009-07-27 Thread Noah Silverman
Hi, I'm not sure that would work for the formula format of an SVM function. the idea is normally svm(label ~ c1 + c2 +c3, data=mydata); It doesn't work to say svm(label ~ -c(22,23,24), data=mydata) On 7/27/09 12:17 PM, Steve Lianoglou wrote: Hi, On Jul 27, 2009, at 3:01 PM, Noah

Re: [R] Forumla format?

2009-07-27 Thread Steve Lianoglou
Hi, On Jul 27, 2009, at 3:47 PM, Noah Silverman wrote: Hi, I'm not sure that would work for the formula format of an SVM function. the idea is normally svm(label ~ c1 + c2 +c3, data=mydata); It doesn't work to say svm(label ~ -c(22,23,24), data=mydata) You're quite right. Sorry, I

Re: [R] Forumla format?

2009-07-27 Thread Bernd Kreuss
Steve Lianoglou wrote: Is it possible to build up your formula as a string, and then convert to formula w/ as.formula? what about simply using it this way instead: svm(label ~ ., data=mydata[,-c(22,23,25,31)]) __ R-help@r-project.org mailing list