Description Usage Arguments Note
Sample rows from a data.frame
1 | sample.data.frame(x, size, replace = FALSE, prob = NULL)
|
x |
A data.frame |
size |
A non-negative integer, or a fraction in [0, 1) (see Note) |
replace |
Should sampling be with replacement? |
prob |
A vector of probability weights |
If size is exactly 1, then one row will be returned. You might instead want sample(x, size = nrow(x), replace = TRUE).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.