dropj | R Documentation |
These functions drop columns of your data.table
by reference
based on a selection of columns, a predicate function or a regex pattern that the
column name must match.
dropj_at(DT, cols)
dropj_if(DT, .p)
dropj_grep(DT, pattern)
DT |
( |
cols |
( |
.p |
( |
pattern |
( |
dropj_at()
drops column based on a vector of column indices or column names.
dropj_if()
takes predicate function .p
as an input that will
be applied to each of the columns and returns a logical vector.
It will then drop those columns for which the function returns TRUE
.
dropj_grep()
takes a regex pattern as input and will check if the
column names match that pattern. If so, they will be dropped.
(data.table::data.table()
)
The functions invisibly return the modified data.table
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.