Skip to content
Prev 77833 / 398502 Next

How to get the rowindices without using which?

try this:

dat <- iris[sample(1:nrow(iris), 10), ]
dat
match(rownames(dat), rownames(iris))


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://www.med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm



----- Original Message ----- 
From: "Martin Lam" <tmlammail at yahoo.com>
To: "R" <r-help at stat.math.ethz.ch>
Sent: Monday, September 26, 2005 10:37 AM
Subject: [R] How to get the rowindices without using which?
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm