【问题标题】:R: Plotly package error in downloading pngR:下载png时的Plotly包错误
【发布时间】:2016-12-22 02:45:49
【问题描述】:

我正在使用 plotly 包在我闪亮的应用程序中创建绘图,但我无法下载这些绘图。因为这是一个闪亮的应用程序,我希望它是交互式的而不是硬编码的。

代码:

library(plotly)
dat <- data.frame(x = rnorm(1:100), y = rnorm(1:100))
p <- ggplot(dat, aes(x = x, y = y)) + geom_point()
plotly_build(p)

会话信息:

R version 3.3.0 (2016-05-03)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.5 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] plotly_3.6.0         ggplot2_2.1.0        BiocInstaller_1.23.6

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.6      tidyr_0.5.1      assertthat_0.1   digest_0.6.9     grid_3.3.0       plyr_1.8.4       R6_2.1.2         jsonlite_1.0    
 [9] gtable_0.2.0     magrittr_1.5     scales_0.4.0     httr_1.2.1       viridis_0.3.4    labeling_0.3     tools_3.3.0      htmlwidgets_0.6 
[17] munsell_0.4.3    yaml_2.1.13      rsconnect_0.4.3  base64enc_0.1-3  colorspace_1.2-6 htmltools_0.3.5  gridExtra_2.2.1  tibble_1.1 

我无法下载剧情。当我单击绘图图中右上角工具栏上的相机时,它给了我以下错误:

我在 Rstudio Viewer 窗格、Safari 和 Chrome 中遇到了这个问题。如何规避这个问题并下载剧情?

【问题讨论】:

  • 您是否尝试过 Murta 这里提到的选项? stackoverflow.com/questions/33959635/…
  • @Pj_ 忘了添加一个非常重要的细节,我在一个闪亮的应用程序中使用它并且不想硬编码任何东西。用户应该能够下载绘图,这就是我希望内置功能正常工作的原因。
  • @Pj_ 您能否将您的评论移至回答以便我接受?安装开发版本有效。 devtools::install_github("ropensci/plotly")

标签: r shiny plotly


【解决方案1】:

更新您的 plotly 包应该可以解决问题。 http://community.plot.ly/t/download-png-not-working-in-r-shiny/1574/3

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-02-28
    • 1970-01-01
    • 1970-01-01
    • 2016-03-01
    • 2018-05-31
    • 2015-01-16
    • 2019-12-19
    • 2023-02-08
    相关资源
    最近更新 更多