【问题标题】:RStudio cannot load web file, but R in terminal can; why?RStudio 无法加载 web 文件,但终端中的 R 可以;为什么?
【发布时间】:2019-01-26 04:57:49
【问题描述】:

我在 Ubuntu 18.04 上运行 RStudio。当我想从 GitHub 加载 this data

d <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/master/airline-safety/airline-safety.csv")

我收到以下错误消息。

Error in file(file, "rt") : cannot open the connection to 'https://raw.githubusercontent.com/fivethirtyeight/data/master/airline-safety/airline-safety.csv'
In addition: Warning message:
In file(file, "rt") :
URL 'https://raw.githubusercontent.com/fivethirtyeight/data/master/airline-safety/airline-safety.csv': status was 'Problem with the SSL CA cert (path? access rights?)'

然而,当我在终端中运行相同的命令时,它可以正常工作,没有任何错误。这个怎么可能?我该如何解决?

【问题讨论】:

    标签: r github ssl-certificate rstudio


    【解决方案1】:

    这似乎类似于issue 1079,其中包括:

    • 请重启R
    • 然后install.packages(c("curl", "httr"))
    • 然后再试一次。

    如果这还不够,请关注swirldev/swirl/issue 475

    【讨论】:

    • 感谢您的回复。不幸的是,这两种解决方案都不起作用。 'curl' 和 'httr' 都已安装。我尝试加载 Github CSV 并加载其中任何一个,或同时加载两者,但无济于事。从 swirldev 链接运行命令也没有修复它。
    猜你喜欢
    • 1970-01-01
    • 2020-09-17
    • 1970-01-01
    • 2019-04-14
    • 2015-08-13
    • 2015-07-13
    • 2021-08-26
    • 2019-06-18
    • 2019-03-23
    相关资源
    最近更新 更多