powered by
This function reclassifies specified columns of a data.table using a provided function.
reclassify(x, v, ...)
The modified data.table with specified columns reclassified.
A data.table. The data.table containing the columns to be reclassified.
A function. The function to apply to each specified column for reclassification.
Additional arguments specifying the names of the columns to be reclassified.
library(data.table) dt <- data.table(a = 1:5, b = 6:10) dt <- reclassify(dt, as.qe.code, "a", "b")
Run the code above in your browser using DataLab