[R] subsetting and NAs
Eric Archer
Eric.Archer at noaa.gov
Mon Mar 20 20:12:40 CET 2006
Had I just looked at flight$year > 2006, I would've seen what was up.
Thanks much Peter!
Cheers,
eric
P Ehlers wrote:
>
> [snip]
>
> flight$year > 2006 will return TRUE/FALSE, not row numbers. Try this:
>
> errors <- subset(flight, subset = year > 2006)
>
> Peter Ehlers
>
--
Eric Archer, Ph.D.
NOAA-SWFSC
8604 La Jolla Shores Dr.
La Jolla, CA 92037
858-546-7121,7003(FAX)
eric.archer at noaa.gov
"Lighthouses are more helpful than churches."
- Benjamin Franklin
"Cogita tute" - Think for yourself
More information about the R-help
mailing list