sample_df | R Documentation |
This function is useful to check a data set. It gives a random number of rows of the input data set.
sample_df(x, n = 10, previous = FALSE)
x |
A data set: either a vector, a matrix or a data frame. |
n |
The number of random rows/elements to sample randomly. |
previous |
Logical scalar. Whether the results of the previous draw should be returned. |
A data base (resp vector) with n
rows (resp elements).
Laurent Berge
sample_df(iris)
sample_df(iris, previous = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.