【问题标题】:Why do I get an error when I run some examples from the online ggplot2 reference manual?当我运行在线 ggplot2 参考手册中的一些示例时,为什么会出现错误?
【发布时间】:2011-01-20 23:16:05
【问题描述】:

尝试在线参考手册中的 ggplot2 示例,特别是在 this page 中,除了第二个示例的第一个图之外,我无法生成所有图。

> d + stat_density2d(geom="tile", aes(fill = ..density..), contour = FALSE) 
Error in `[<-.data.frame`(`*tmp*`, var, value = list(`NA` = NULL)) : 
  missing values are not allowed in subscripted assignments of data frames
In addition: Warning message:
Removed 34912 rows containing missing values (stat_density2d).

我有 R 版本。 2.10.1 和 ggplot2 版本。 0.8.6

怎么了?

【问题讨论】:

  • summary(d) 看起来像什么?您确定数据框没有问题,并且您正在访问正确的列吗?

标签: r ggplot2


【解决方案1】:

【讨论】:

    猜你喜欢
    • 2014-04-29
    • 2020-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-27
    • 2022-01-17
    • 1970-01-01
    • 2020-11-11
    相关资源
    最近更新 更多