[R] subset range selections

Mark Knecht markknecht at gmail.com
Mon Jul 13 15:47:05 CEST 2009


How would I write the two selections each in a single subset command?

1) Two non-overlapping time ranges I want to collect together - before
10AM and after noon. Should be an OR function:

X = subset(A, t<1000)  + subset(A, t>1200)

2) One range between two defined times like after 10AM and before
noon. Should be an AND function:

X1 = subset(A, t>1000)
X = subset(X1, t<1200)

Thanks,
Mark

P.S. - The help system seems very difficult for finding this sort of
information!




More information about the R-help mailing list