powered by
keep(x, ...)keep_(x, vars)
keep_(x, vars)
library(data.table) DT <- data.table( id = c(1,2), v1 = c(1,1), v2 = c(2,1) ) keep(DT, id, v2) keep(DT, -id)
Run the code above in your browser using DataLab