lundi 5 septembre 2016

Create 1000 samples of 30 observations from data.frame

I have got a data.frame and I need to create 1000 random samples, each one containing 30 observations.

Here an example of my data.frame:

df = read.table(text = 'ID Letter
1 L
2 R
3 T
4 U
5 I
6 K
7 Y
8 Q
9 A 
10 R', header = TRUE)

The column from where the samples must be taken is df$Letter.

Any suggestion?




Aucun commentaire:

Enregistrer un commentaire