[R] How do I find the index for a value in an array

George Chen glchen at stanford.edu
Sun Jan 4 07:21:54 CET 2009


Hello,
Could anybody tell me how to find the index for a value which I define in an array?

ie.

c<-matrix(1:9,1,9)  #A 1x9 matrix filled with numbers 1 - 9 in order
I want to know the index for the value 5. 

Thanks in advance,

George Chen




More information about the R-help mailing list