Displaying 1 result from an estimated 1 matches for "daf1".
Did you mean:
da1
2008 Aug 25
2
Using sample() with a data frame ?
I have a data frame (daf1), that holds +80000 records, and 10 variables (i.e. 10 columns and some 80000 rows)
> length(daf1)
[1] 10
> length(daf1[,1])
[1] 83805
I would like to sample() e.g. 10000 records from this. I use:
> daf2 <- sample(daf1, 1000, replace = FALSE, prob = NULL)
Error in `[.data.frame`(x, ....