chooseNrandom: Randomly choose rows by group

Description Usage Arguments Value

View source: R/chooseNrandom.R

Description

Takes N random rows from a data table. If grouping column provided, sampling is performed by group.

Usage

1
chooseNrandom(in.dt, in.n, in.col.id, in.col.group)

Arguments

in.dt

Input data table

in.n

Number of rows to sample

in.col.id

Name of the column with unique row id's

in.col.group

Name of the grouping column

Value

Data table with sampled rows


dmattek/tca-package documentation built on Dec. 10, 2019, 4:10 p.m.