def_cols | R Documentation |
function used to create new columns in data.table using non-standard evaluation
def_cols(dt, ...)
dt |
a |
... |
formula using |
returns a data.table
## Not run: dt <- data.table(mtcars) define(dt, kmpl ~ mpg / 2.35215, wt_in_kg ~ wt / 2.20462) # creating two columns / converted units define(dt, am = NULL) # remove a column ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.