[R] help: how to get the position of a value in a matrix

Simon Blomberg blomsp at ozemail.com.au
Thu Jul 14 01:41:01 CEST 2005

See ?which Hint: arr.ind=TRUE


At 09:28 AM 14/07/2005, wu sz wrote:
>I have a data set matrix of 1200 * 15. How can I get the position of a
>specific value in the matrix?
>I use "seq(along = x)[x > value]" to look for the position of the
>value in the matrix, but "seq" can just find the sequence position row
>by row in the matrix, not a real position (like "rowNumber,
>colNumber"). Is any function for that?
>Thank you,
>R-help at stat.math.ethz.ch mailing list
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list