Re: [R] using subset() in data frame

From: Robert Walters <>
Date: Sat, 23 Feb 2008 13:57:40 -0500

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.


Robert Walters mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sat 23 Feb 2008 - 19:03:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 23 Feb 2008 - 20:30:16 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive