# NOT RUN {
library(data.table)
inputDT <- as.data.table(data.frame(x = seq(1, 20, 2), y = LETTERS[1:10]))
# }
# NOT RUN {
asNumericDT(inputDT)
# }
# NOT RUN {
asNumericDT(inputDT, c('x', 'y'))
# First looking at the result, followed by testing if the transformation worked!
inputDT
isNumericDT(inputDT, c('x', 'y'))
isIntegerDT(inputDT, c('x', 'y'))
# }
Run the code above in your browser using DataLab