Apologies for a question that probably makes it obvious that I usually work in Python/pandas, but I\'m stuck with this. How do I select a data.table column usin
data.table
You can use get() as the j argument using single brackets:
get()
j
library(data.table) dt <- data.table(iris) dt[, get("Species")]
The result:
[1] setosa setosa setosa setosa setosa setosa .....
You can also use a string directly inside the double bracket operator, like this:
dt[["Species"]]