[R] conditional less than

Brian J. Haag brian_haag at yahoo.com
Mon Oct 13 21:03:23 CEST 2003


I'm sure this is a total noob question, but half an
hour of searching bore no fruit: How do you select a
subset of a vector by negative value?  If I try

> hist(sp$p[sp$r>0.01])   # all is well
> hist(sp$p[sp$r<-0.01])  # this obviously causes
issues

Also, putting -0.01 in parentheses didn't help.

Thanks in advance --

b




More information about the R-help mailing list