View source: R/qedata_define.R
| reclassify | R Documentation |
This function reclassifies specified columns of a data.table using a provided function.
reclassify(x, v, ...)
x |
A data.table. The data.table containing the columns to be reclassified. |
v |
A function. The function to apply to each specified column for reclassification. |
... |
Additional arguments specifying the names of the columns to be reclassified. |
The modified data.table with specified columns reclassified.
library(data.table)
dt <- data.table(a = 1:5, b = 6:10)
dt <- reclassify(dt, as.qe.code, "a", "b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.