powered by
The randrows() function randomly samples a specified number of rows from a dataframe.
randrows()
randrows(.data, n = 5)
A dataframe containing the randomly sampled rows.
The dataframe from which rows are to be sampled.
The number of rows to be randomly sampled. Default is 5.
# Randomly sample 3 rows from the dataset randrows(esmdata_sim, n = 3)
Run the code above in your browser using DataLab