[R] numbers not behaving as expected

Stavros Macrakis macrakis at alum.mit.edu
Thu Apr 9 19:51:35 CEST 2009


On Thu, Apr 9, 2009 at 1:39 PM,  <Steve_Friedman at nps.gov> wrote:
> I have a data.frame Cell.ave (attached and created via dput(Cell.ave,
> "Cell.ave")

I'm afraid your attachment didn't make it into the r-help mail.
Mailing list policy forbids binary attachments other than PS and PDF,
but should be forwarding plaintext attachments, I think.  Perhaps it
requires that the extension be ".txt" or something...?

Anyway... the problem seems diagnosable just from your code:

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

There is no *string* which is >= "5" and <= "11".  Why aren't you
comparing numerically?

             -s




More information about the R-help mailing list