[R] extracting names from matrix according to a condition

From: ivan <i.petzev_at_gmail.com>
Date: Mon, 25 Apr 2011 19:58:24 +0200


Dear Community,

I have a matrix with assigned colnames and rolnames as follows:

            A            B
NR    0.15      0,05
AL     0,05      0,05

. . .
. . .
. . .

I want to extract the names of the rows for which A>0,1 and B<0,1. In the above example this would be observation NR only. Hence the output should write for instance:

names:
NR

Is this possible? Thank you very much for your help.

Best Regards



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 25 Apr 2011 - 18:00:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 25 Apr 2011 - 18:40:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive