I would like to take the log of some columns, and create new columns that are all named log[original column name].
The code below works, but how can I pass the vecto
Ignoring the "use dplyr" part...
require(data.table) mtcars <- as.data.table(mtcars) mtcars[, paste0('log', columnstolog) := lapply(.SD, log), .SDcols = columnstolog]