Re: [R] How make a x,y dataset from a formula based entry

2011-09-23 Thread Gabor Grothendieck
On Thu, Sep 22, 2011 at 2:54 PM, trekvana wrote: > Hello all, > > So I am using the (formula entry) method for randomForests: > > randomForest(y~x1+x2+...+x39+x40,data=xxx,...) but the issue is that some of > the items in that package dont take a formula entry - you have to explicitly > state the

Re: [R] How make a x,y dataset from a formula based entry

2011-09-23 Thread Jean-Christophe BOUËTTÉ
Also, if your formula is really of the form y ~x1+...+xn you can have a look at the last example for ?formula for a simple way to generate the formula. HTH, JC 2011/9/23 Helios de Rosario : > To separate the parts of a formula, use as.character > (check the examples in ?character) > > Helios > > 2

Re: [R] How make a x,y dataset from a formula based entry

2011-09-23 Thread Helios de Rosario
To separate the parts of a formula, use as.character (check the examples in ?character) Helios 22 Sep 2011 16:14:05 -0400 From: Jean-Christophe BOU?TT? > Hello, > You can check ?model.frame. > I do not know however to extract only the right-hand of left-hand part > of a formula. > > JC > > 201

Re: [R] How make a x,y dataset from a formula based entry

2011-09-22 Thread Jean-Christophe BOUËTTÉ
Hello, You can check ?model.frame. I do not know however to extract only the right-hand of left-hand part of a formula. JC 2011/9/22 trekvana : > Hello all, > > So I am using the (formula entry) method for randomForests: > > randomForest(y~x1+x2+...+x39+x40,data=xxx,...) but the issue is that som

[R] How make a x,y dataset from a formula based entry

2011-09-22 Thread trekvana
Hello all, So I am using the (formula entry) method for randomForests: randomForest(y~x1+x2+...+x39+x40,data=xxx,...) but the issue is that some of the items in that package dont take a formula entry - you have to explicitly state the y and x vector: randomForest(x=xxx[,c('x1','x2',...,'x40')],