【问题标题】:Error using plotly in Rstudio - unused argument plot$data在 Rstudio 中使用 plotly 时出错 - 未使用的参数 plot$data
【发布时间】:2016-03-03 13:00:05
【问题描述】:

即使使用ggplotly 帮助函数中给出的示例代码...我不断收到以下错误

map_layout 中的错误(面板、plot$facet、layer_data、plot$data):
未使用的参数(plot$data)

【问题讨论】:

  • 我的猜测是,某些比ggplotly 加载晚的包有自己的函数map_layout,具有不同的参数。你能给我们sessionInfo()吗?
  • 如果coffeeinjubky 是正确的,您可以尝试在函数名称前使用'plotly::' 直接调用plotly。
  • @coffeinjunky- sessionInfo() 输出如下。附加的基础包:[1] stats graphics grDevices utils datasets methods base 其他附加包:[1] devtools_1.10.0 googleVis_0.5.10 plotly_2.0.16 ggplot2_2.1.0
  • ggtern 包我遇到了同样的问题。

标签: r ggplot2 plotly


【解决方案1】:

我遇到了同样的问题,并遵循了@royr2 建议的解决方案。具体来说,我使用devtools::install_github("ropensci/plotly") 安装了plotly 的开发版本并重新启动了我的R 会话并重新加载了包。之后ggplotly又在RStudio工作。

【讨论】:

    【解决方案2】:

    我知道这本身不是答案,但这已被记录为 ggplot 2.1.0 的已知问题 - 请参阅链接:

    https://github.com/ropensci/plotly/issues/481

    【讨论】:

      猜你喜欢
      • 2021-08-09
      • 1970-01-01
      • 2018-03-04
      • 2018-09-23
      • 2021-01-05
      • 1970-01-01
      • 1970-01-01
      • 2023-02-05
      • 1970-01-01
      相关资源
      最近更新 更多