How to slice column with character object in data table in R? I have tried this piece of codes but it does not work
i <- "Spot"
DT[1,i]
I want the code to return the result as the same as
DT[1,"Spot"]
Can I ask what is the correct way to do it with the character obejct i instead of the character itself "Spot"?