我的data.table返回一行充满NA而不是

时间:2014-09-12 09:06:03

标签: r data.table

为什么这个例子我的数据表仍在返回一行?

> DT = data.table(x=c("b","b","b","a","a"),v=rnorm(5))
> setkey(DT,x)
> DT
   x          v
1: a  0.2996065
2: a -0.7643157
3: b -1.0991499
4: b  0.1314460
5: b  0.5734016

> DT['c']
   x  v
1: c NA

0 个答案:

没有答案