R - Sample

Card Puncher Data Processing

About

Sample is a function that return a random subset of a data set.

Example

set.seed(1)
# random subset of the original data so that N=15
sample = data[sample(nrow(data), 15), ]

where:







Share this page:
Follow us:
Task Runner