search for: dataf2

Displaying 1 result from an estimated 1 matches for "dataf2".

Did you mean: data2
2008 Sep 15
1
randomly sample within clustered data?
...151.8044 2 17 103 f 155.4976 4 18 103 m 150.0423 1 19 103 f 146.0487 5 20 103 m 154.6651 7 > Here's the R code I wrote that obviously does not work: sapply(split(Dataf, Dataf$id), sample, size=2) I would prefer a data frame (i.e., Dataf2) as the final output and it should look something like this: > Dataf2 id sex weight attitude 1 100 m 146.5064 6 2 100 m 144.7218 7 3 101 m 147.9071 4 4 101 m 154.4634 1 5 102 m 153.2719 5 6 102 m 148.9821 5 7 103 f...