r remove column by index code example
Example 1: how to drop a column in r
keeps <- c("y", "a")
DF[keeps]
Example 2: r remove column by index
DT[, coltodelete := NULL]
keeps <- c("y", "a")
DF[keeps]
DT[, coltodelete := NULL]