[R] indexing a vector

David White dwhite at ling.ohio-state.edu
Mon May 7 20:32:55 CEST 2001

Dear R-List,

How can one look up the row/column number for a given value in a matrix or
data.frame?  For example in a matrix that contains only unique values for
in [,1] how can I find value x in [,1] and report its row number?



S. David White
sdavidwhite at bigfoot.com
Columbus, Ohio

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list