【发布时间】:2018-10-03 09:13:48
【问题描述】:
我已经构建了一个新包,它托管在 GitHub 上的github.com/kevinwolz/hisafer。
我正在尝试通过 devtools::install_github() 安装软件包,但我收到了奇怪的错误。帮忙?
>install_github("kevinwolz/hisafer")
Downloading GitHub repo kevinwolz/hisafer@master
from URL https://api.github.com/repos/kevinwolz/hisafer/zipball/master
Installing hisafer
[这里,5个包依赖(dplyr、tidyr、purrr、ggplot2、lubridate)自动安装成功,但是我漏掉了文字]
"C:/Users/wolzkevi/DOCUME~1/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save \
--no-restore --quiet CMD INSTALL \
"C:/Users/wolzkevi/AppData/Local/Temp/Rtmpg5OyD6/devtools28843ed4c0a/kevinwolz-hisafer-bf69883" \
--library="C:/Users/wolzkevi/Documents/R/R-3.4.3/library" --install-tests
* installing *source* package 'hisafer' ...
** R
** inst
** preparing package for lazy loading
Error : '' does not exist in current working directory ('C:/Users/wolzkevi/AppData/Local/Temp/Rtmpg5OyD6/devtools28843ed4c0a/kevinwolz-hisafer-bf69883').
Error : unable to load R code in package 'hisafer'
ERROR: lazy loading failed for package 'hisafer'
* removing 'C:/Users/wolzkevi/Documents/R/R-3.4.3/library/hisafer'
In R CMD INSTALL
Installation failed: Command failed (1)
这里的严重错误似乎是“错误:当前工作目录中不存在''。有谁知道为什么会发生这种情况?我的包的构建/设置方式是否会导致问题?当不从 GitHub 下载时,我可以从源代码安装包,这让我相信 GitHub 进程中发生了一些奇怪的事情。
会话信息:
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.13.4
loaded via a namespace (and not attached):
[1] httr_1.3.1 compiler_3.4.3 R6_2.2.2 tools_3.4.3 withr_2.1.1 curl_3.1
[7] memoise_1.1.0 knitr_1.19 git2r_0.21.0 digest_0.6.15
【问题讨论】:
-
我还没有发现问题,但是在一个无关的注释中,您可能想要删除所有
.DS_Store文件,然后将.DS_Store添加到您的.gitignore -
查看我的回答的更新,讨论您可能如何解决
inst/extdata/文件未显示的问题——也与.gitignore有关。