Skip to content
Prev 77372 / 398502 Next

How do I get the row indices?

?row
row(iris)[iris[,1]==6.2]

##or better yet

?which
which(iris[,1]==6.2)

Note also that both may fail because the test may not be numerically exact
-- you may need to add fuzz.

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box