【问题标题】:Error in file(con, "rb") : cannot open the connection文件中的错误(con,“rb”):无法打开连接
【发布时间】:2017-02-04 21:45:00
【问题描述】:

我在 Mac 上运行 R Studio 1.0.136。当我尝试运行下面的代码时出现错误

Error in file(con, "rb") : cannot open the connection 

我浏览了 stackoverflow 中的每个线程,包括 this 以及我在 Coursera 上发布的问题。我没有办法绕过这个问题。我什至尝试迁移到 Windows 环境并得到了同样的错误。我很感激任何帮助。 奇怪的是它是从控制台运行的,但我只有在运行 knitr 时才得到错误。 谢谢。

library(plotly)
set.seed(100)
d <- diamonds[sample(nrow(diamonds), 1000), ]
plot_ly(d, x = ~carat, y = ~price, color = ~carat, size = ~carat)

只要标记文件在这里1

【问题讨论】:

标签: r plotly


【解决方案1】:

这是我为解决此问题所做的: 不要从菜单中选择“New R Presentation”,而是选择“R Markdown”,然后从弹出窗口中选择“R Presentation”。这是一个奇怪的解决方法,但对我有用,希望对你也有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-07
    • 2019-02-19
    • 1970-01-01
    相关资源
    最近更新 更多