[R] using subset() in data frame

Robert Walters pungo9nc at embarqmail.com
Sat Feb 23 20:52:43 CET 2008


Chuck Cleland wrote:
> On 2/23/2008 9:13 AM, Robert Walters wrote:
>> Chuck Cleland wrote:

Chuck,
For the record, I might add that that the following two variants for 
subsetting worked equally well:

fit1 <- lm(pore.pct ~ Db,  subset(data.b, porosity == "macro "))

fit1 <- lm(pore.pct ~ Db, data.b[data.b$porosity == "macro ",])

So the problem was two-fold. I'll never know if any of the variations of 
subset I was typing were correct due to the "macro" error.


Robert Walters



More information about the R-help mailing list