R - Sample
About
Sample is a function that return a random subset of a data set.
Articles Related
Example
set.seed(1)
# random subset of the original data so that N=15
sample = data[sample(nrow(data), 15), ]
where:
Sample is a function that return a random subset of a data set.
set.seed(1)
# random subset of the original data so that N=15
sample = data[sample(nrow(data), 15), ]
where: