Re: [R] subsetting a dataframe with a string logical expression

2009-07-08 Thread Henrique Dallazuanna
Try this: subset(x, eval(parse(text=filter))) On Wed, Jul 8, 2009 at 4:46 PM, Tracey Frescino wrote: > Hi, > > I am trying to subset a dataset based on a filter defined by a user... > I prompt the user for input.. resulting in a string logical expression > ("X1 < 3"). > > I have tried using su

[R] subsetting a dataframe with a string logical expression

2009-07-08 Thread Tracey Frescino
Hi, I am trying to subset a dataset based on a filter defined by a user... I prompt the user for input.. resulting in a string logical expression ("X1 < 3"). I have tried using subset, but it is looking for a logical expression, not a character string. I keep getting the error: 'subset' must