[R] using subset() in data frame
Robert Walters
pungo9nc at embarqmail.com
Sat Feb 23 19:57:40 CET 2008
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 generous help. As Greg perceptively noted above,
there is indeed a space after "macro ". When I went back and changed
porosity == "macro" to "macro " the program ran without a flaw. I think
this error goes back to the .csv file which I read into R. For some
reason it's propagating a space after macro that's not visible in the
file, but R picks up. In future, I'll be careful to note how R expresses
variables read from external files.
Sincerely,
Robert Walters
More information about the R-help
mailing list