randrows | R Documentation |
The randrows()
function randomly samples a specified number of rows from a dataframe.
randrows(.data, n = 5)
.data |
The dataframe from which rows are to be sampled. |
n |
The number of rows to be randomly sampled. Default is 5. |
A dataframe containing the randomly sampled rows.
# Randomly sample 3 rows from the dataset
randrows(esmdata_sim, n = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.