GetSampleFromDataFrame {dils}R Documentation

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

Author(s)

Stephen R. Haptonstahl srh@haptonstahl.org

References

https://github.com/shaptonstahl/

See Also

ScalablePCA, GetSampleFromFile, GetSampleFromFile

Examples

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

[Package dils version 0.8.1 Index]