I want to extract the 4th, 5th, and 6th column from a data table named dt
the following method works:
dt[, c(4,5,6)]
but the following doesn't:
a = c(4,5,6)
dt[, a]
In fact, the second method gives me a reult of:
4 5 6
Can someone tell me why this is happening? The two method looks equivalent to me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…