subsetDT: subsetDT()

Description Usage Arguments

Description

Subsets a data.table by either setting keys, or using keys that have already been set. This type of subset may be faster than using a subset expression in the i clause of a data.table statement without setting keys.

Usage

1
subsetDT(data, ..., ref = TRUE)

Arguments

data

a data.table

...

one or more lists, where the first element of the list is the column name, and the second element is one or more items from that column to subset.

ref

TRUE by default, it will take the keys that are set during the subset process and apply those keys to data by reference. If FALSE, a copy of data is made via data.table::copy(), leaving data unaffected by the key setting in subsetDT.


jakesherman/jakemisc documentation built on May 18, 2019, 9:08 a.m.