On 2/22/2008 8:01 PM, Robert Walters wrote:
R folks,
As an R novice, I struggle with the mystery of subsetting. Textbook and
online examples of this seem quite straightforward yet I cannot get my
mind around it. For practice, I'm using the code in MASS Ch. 6,
whiteside data to analyze a
On 2/23/2008 6:09 AM, Chuck Cleland wrote:
On 2/22/2008 8:01 PM, Robert Walters wrote:
R folks,
As an R novice, I struggle with the mystery of subsetting. Textbook
and online examples of this seem quite straightforward yet I cannot
get my mind around it. For practice, I'm using the code in
Erin Hodgess wrote:
Hi Robert!
Could you please check
str(data.b)
and see what you have for porosity? It needs to be a factor
Thanks,
Erin
Erin,
Yes, porosity is a factor. See output below.
str(data.b)
'data.frame': 96 obs. of 7 variables:
$ system : Factor w/ 6 levels
Chuck Cleland wrote:
On 2/23/2008 6:09 AM, Chuck Cleland wrote:
On 2/22/2008 8:01 PM, Robert Walters wrote:
Chuck,
Thanks for the pointers on subset(). When I submit the two variants you
suggested, below:
fit1 - lm(y ~ x, subset(data.b, porosity == macro))
Error in eval(expr, envir, enclos)
Greg Snow wrote:
Look carefully at the output and commands below.
The first level of porosity is macro (notice the space at the
end) but you are asking for macro (without the space). Computers are
very literal, so macro is not equal to macro. T
Greg and Chuck,
Thanks for your very
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,
6 matches
Mail list logo