Hello,

If the files are to be processed in R select a random sample in R.
Using list.files() you can assign a character vector with the filenames of interest and then sample from that vector.

?list.files
filenames <- list.files(path, pattern)

rand.sampl <- sample(filenames, 45)

Hope this helps,

Rui Barradas

Em 28-07-2012 18:49, Erin Hodgess escreveu:
Dear R People:

I am using a Linux system in which I have about 3000 files.

I would like to randomly select about 45 of those files to be processed in R.

Could I make the selection in R or should I do it in Linux, please?

This is with R-2.15.1.

Thanks,
erin



______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to