indices = sample(100, 5)
selected = dat[indices, ]
should do it.
-aram
On 4/24/06, Jacqueline Chattopadhyay <jchattop(a)fas.harvard.edu> wrote:
Hello,
When one chooses a random sample of observations from a dataset, is there a
way to find out which observation numbers were put into this random sample?
That is, if I choose 5 random observations from a dataset with 100
observations, is there a way to tell whether it was observations 1, 2, 3, 4,
5, or observations 21, 46, 52, 16, 2, etc?
Thanks,
Jacqueline
--
Jacqueline Chattopadhyay
Ph.D Student, Government & Social Policy
Harvard University
jchattop(a)fas.harvard.edu
jchattop(a)gmail.com
714.313.7022
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l