vendredi 27 janvier 2017

Random Sampling in R

I have a data.frame that is 75 rows by 25 columns. I need to take 10, 20, 30, etc... random samples from the data in the data.frame. How can I take random samples from this data.frame. I do not want to get random rows, but specifically random samples from the data.frame. The sample() function seems to only give me random rows, but I only need 10 random samples from the 1875 data points. How do I do this?




Aucun commentaire:

Enregistrer un commentaire