Description Usage Arguments Changes Author(s) References See Also
Sample rows from a dataframe or matrix
1 | randomRows(x, size, replace = FALSE, prob = NULL)
|
x |
a data frame or matrix |
size |
a non-negative integer giving the number of items to choose. |
replace |
Should sampling be with replacement? |
prob |
A vector of probability weights for obtaining the elements of the vector being sampled. |
Matched parameters to sample – njf, May 18, 2015
http://stackoverflow.com/questions/8273313/random-rows-in-dataframe-in-r
sample_n
for dplyr users
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.