[英]R's data.table can not find the function “.”
I read that data.table understands the dot "." 我读了data.table理解点“。” as an alias of "list".
作为“列表”的别名。 But:
但:
> dt <- data.table(x = c(11, 22), y = c("f", "b"))
> dt
x y
1: 11 f
2: 22 b
> dt[,.(y)]
Error in eval(expr, envir, enclos) : could not find function "."
>
Why is that? 这是为什么?
According to the data.table New features on v.1.9.4
( https://github.com/Rdatatable/data.table ), 根据
v.1.9.4
( https://github.com/Rdatatable/data.table )上的data.table新功能,
.() can now be used in j and is identical to list(), for consistency with i.
。()现在可以在j中使用,并且与list()相同,以便与i保持一致。
So, it is better to install either v.1.9.4
version or the devel version from here 因此,最好从此处安装
v.1.9.4
版本或devel版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.