尝试从 R Archive 下载“USAboundaries”

问题描述 投票:0回答:1

我正在尝试从 R Archive 下载“USAboundaries”包,但收到此错误:

install.packages(pkgs=pkgFile, type="source", repos=NULL)

Error in getOctD(x, offset, len) : invalid octal digit
Warning in install.packages :
  installation of package ‘USAboundaries_0.4.0.tar.gz’ had non-zero exit status

“USAboundaries_0.4.0.tar.gz”描述中没有列出依赖项。

这是我到目前为止所拥有的:

url <- "https://cran.r-project.org/web/packages/USAboundaries/index.html"
pkgFile <- "USAboundaries_0.4.0.tar.gz"
download.file(url = url, destfile = pkgFile)
install.packages(pkgs=pkgFile, type="source", repos=NULL)
r install.packages
1个回答
0
投票

试试这个:

pkgFile <- "USAboundaries_0.4.0.tar.gz"

url <- paste0("https://cran.r-project.org/src/contrib/Archive/USAboundaries/", pkgFile)
download.file(url = url, destfile = pkgFile)
install.packages(pkgs = pkgFile, type = "source", repos = NULL)

另请参阅此答案

© www.soinside.com 2019 - 2024. All rights reserved.