sample: Sample n rows from a table

Description Usage Arguments Value See Also Examples

Description

Analogous function for sample_n and sample_frac in dplyr.

Usage

1
2
3

Arguments

data

data.frame

size

sample_n_dt(), the number of rows to select. For sample_frac_dt, the fraction of rows to select.

replace

Sample with or without replacement? Default uses FALSE.

Value

data.table

See Also

sample_n,sample_frac

Examples

1
2
3
4

hope-data-science/tidydt documentation built on Feb. 21, 2020, 10:25 a.m.