首次尝试使用ggplot2,代码非常简单,但是会发生错误:
a <- c(1,2,3)
b <- c(2,3,4)
> qplot(a,b)
Error in .Call("split_indices", group, as.integer(n)) :
"split_indices" not resolved from current namespace (plyr)
> ggplot(data.frame(a,b), aes(a,b)) +geom_line()
Error in .Call("split_indices", group, as.integer(n)) :
"split_indices" not resolved from current namespace (plyr)
我已验证plyr已安装(v1.8),ggplot2(v0.9.3.1)。无论我在网上找到什么示例,都会出现相同的错误。有什么想法吗?
编辑:解决方案可能是在安装ggplot2包后重新启动RStudio。我怀疑在发布问题之前已经执行了此操作,但不确定。
sessionInfo()
输出。 - Arun