View source: R/utility_functions.R
| setcolsnull | R Documentation |
data.table columns if thereDeletes columns in a data.table conveniently.
May only delete columns that are found silently. Sometimes useful in e.g.
on.exit expressions.
setcolsnull(
DT = NULL,
delete = NULL,
keep = NULL,
colorder = FALSE,
soft = TRUE
)
DT |
a |
delete |
a character vector of column names to be deleted |
keep |
a character vector of column names to keep;
the rest will be removed; |
colorder |
logical; if |
soft |
logical; if |
Always returns NULL invisibly.
This function is called for its side effects.
Joonas Miettinen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.