sample_df: Randomly sample a data.frame

Description Usage Arguments Value See Also Examples

View source: R/sample-df.R

Description

Sample rows by either specifying the number of desired rows as an integer (e.g. n = 10) or as a fraction (e.g. n = 0.1) of the total number of rows.

Usage

1

Arguments

data

a data.frame

n

Either a positive integer or a fraction between 0 and 1

Value

a subset of randomly selected rows from data

See Also

sample_n, sample_frac.

Examples

1
2

sboysel/boysel documentation built on May 29, 2019, 3:24 p.m.