powered by
Small Random Sample from a vector or data.frame
rhead(data, rows = 7, is.random = TRUE)
A vector or data.frame from which a small sample is to be returned
A positive integer, representing the number of lines or elements to print, default is 7.
a boolean. If TRUE, a random sample is drawn, else it takes the head() of the data
A random sample without replacement taken from the data, in the same format than the input.
If the rows parameter is greater than the actual number of rows/elements of the data, the returned value is the initial dataset after shuffling
# NOT RUN { set.seed(1234) rhead(mtcars) # }
Run the code above in your browser using DataLab