繁体   English   中英

将 install_github 用于 statsr 包时出错

[英]Error using install_github for statsr package

我正在尝试使用以下命令为 Coursera 课程安装配套的 R 包:

library(devtools)
install_github("StatsWithR/statsr")
Error in curl::curl_fetch_disk(url, x$path, handle = handle) : 
  Couldn't resolve host name

打赌错误是由于防火墙造成的,因为在家里(我没有防火墙,但 R 和 RStudio 的版本完全相同)我可以完美地安装。 有没有可能修复它? 否则,由于我可以在我的电脑上从 Github 下载软件包,我该如何手动安装软件包?

请将您的DNS更改为公共DNS
你可以试试 Google DNS (8.8.8.8 and 8.8.4.4) 它对我来说很好。

单击此处查看如何设置公共 DNS

要解决这个问题,您必须安装这些对我有用的软件包。

install.packages("devtools")

install.packages("dplyr")

install.packages("rmarkdown")

install.packages("ggplot2")

install.packages("broom")

install.packages("gridExtra")

install.packages("shiny")

install.packages("cubature")

library(devtools)

install_github("StatsWithR/statsr")

或使用这个

install.packages(data.table)
devtools::install_github("arunsrinivasan/cran.stats")

您可以尝试先安装Rtools,然后运行命令。 https://cran.r-project.org/bin/windows/Rtools/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM