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

From: Robert Walters <pungo9nc_at_embarqmail.com>
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.

Sincerely,

Robert Walters



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive