Skip to content
Prev 78086 / 398502 Next

How to get the rowindices without using which?

I'm  not certain what you are asking.  Consider the following:

set.seed(1)
(irows <- sample(1:nrow(iris), 10))
iris[irows,]

	  If you want more than this, PLEASE do read the posting guide! 
"www.R-project.org/posting-guide.html".  I believe that people who 
follow the posting guide generally get quicker and better answers than 
those who don't.

	  spencer graves
Martin Lam wrote: