Learn R Programming

dils (version 0.8.1)

GetSampleFromDataFrame: Randomly select rows from a data.frame.

Description

Randomly select n rows from data.frame x.

Usage

GetSampleFromDataFrame(n, x)

Arguments

n
numeric, size of sample.
x
data.frame, data whose rows will be sampled.

Value

data.frame, size n random subset of the rows of x

References

https://github.com/shaptonstahl/

See Also

ScalablePCA, GetSampleFromFile, GetSampleFromFile

Examples

Run this code
data(iris)   # provides example data
x <- dils:::GetSampleFromDataFrame(10, iris)

Run the code above in your browser using DataLab