[R] random sample from a file

From: Tibi Codilean <Tibi.Codilean_at_ges.gla.ac.uk>
Date: Mon 05 Jun 2006 - 20:09:50 EST

Dear All,

Thanks to all that responded to my earlier query.

I have a file with two columns: an ID field and a Data field. I wish to extract multiple random samples of 20 numbers from this file in such a way that the ID field is extracted with the data as well. At the moment I am using the 'sample' function but this only extracts the data without the IDs. The file is a comma separated text file and I read it in using read.csv

Could you please tell me if there is a way of doing this such that every random sample contains both the ID and the data.


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jun 05 20:22:40 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 05 Jun 2006 - 22:10:29 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.