On Thu, Apr 9, 2009 at 2:05 PM,  <steve_fried...@nps.gov> wrote:
> WetMonths <- Cell.ave[Cell.ave$month  >= "5" and Cell.ave$month <= "11",]
> Error: unexpected symbol in "WetMonths <- Cell.ave[Cell.ave$month  >= "5"
> and"  Cell.ave$month <= "11",]

a) you are comparing with the *string* "5", not the *number* 5 (as I
mentioned before)
b) you are now writing "and" rather than "&"

The following works fine for me:

WetMonths <- Cell.ave[Cell.ave$month  >=  5 & Cell.ave$month <= 11,]

Better?

         -s

______________________________________________
R-help@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.

Reply via email to