raw
是 adata.table
并且以下代码有效:
raw[,r_responseTime] #Returns the whole column
raw[,c_filesetSize] #Same as above, returns column
plot(raw[,r_responseTime]~raw[,c_filesetSize]) #draws something
现在我想从一个字符串中指定这些列,例如:
col1="r_reponseTime"
col2="c_filesetSize"
现在如何在通过字符串引用列的同时实现与上述相同的效果?
raw[,col1] #Returns the whole column
raw[,col2] #Same as above, returns column
plot(raw[,col1]~raw[,col2]) #draws something
不起作用,当然是因为我需要某种“取消引用”。我不知道在帮助和互联网中搜索什么,很抱歉这个愚蠢的问题。