Description Usage Arguments Value See Also Examples
Extract a simple random sample from a data.frame, allowing user to choose particular variables.
1 |
df |
The data frame to be sampled from. |
n |
Number of individuals (i.e., rows) to sample. |
replace |
A logical that indicates whether sampling with replacement should be used or not (default). |
vars |
A vector of strings that indicates which variables to include in the returned data.frame. |
removeRowNames |
A logical that indicates whether the rownames should be removed from the resultant data.frame. |
Returns a data.frame of rows sampled from df
. Optionally, only includes the columns listed in vars
.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.