[R] selecting subsets of data from matrix

Laura Quinn laura at env.leeds.ac.uk
Mon Oct 20 19:41:29 CEST 2003


Probably a stupid question, but I don't seem to be able to find the answer
I'm looking for from any of the R literature. Basically I have a matrix
with several thousand rows and 20 columns(weather stations) of wind
direction data.

I am wanting to extract a matrix which contains data for all columns
conditional on column 20 having a value of _either_ less than 45 or
greater than 315. (ie I want to extract a matrix which contains wind direction
data for all columns {weather stations} when there is a prevailing
northerly wind for one of the stations).

I have tried a few different methods of doing this, none with any success,
can anyone please advise?

Thanks in advance!




More information about the R-help mailing list