[R] choosing a random sample by precentage

Xebar Saram zeltakc at gmail.com
Fri Jul 23 00:49:57 CEST 2010


hi all

i have found the follwoing way to choose a random sample by sample size (200):

ten_per_T2000 <- F_T2000_All[sample(nrow(F_T2000_All), 200), ]


 but i wondered if there is a way to choose a sample size by
precentage (10% etc..)

thx

ethan



More information about the R-help mailing list