我不知道如何使这个问题重现,但这里是对问题的描述。我昨天升级到R v 3.4.0(sessionInfo()在下面),我的一个RStudio项目无法在packrat中更新软件包。搞乱各种修复后#34;没有成功,我决定最后删除packrat(packrat目录,项目目录的.RStudio文件)。不幸的是,我现在无法在这个项目中重新初始化packrat。以下是
的R输出> packrat::init()
Initializing packrat project in directory:
- "~/my-project-path"
Error in isNamespaceLoaded(pkg) :
attempt to use zero-length variable name
In addition: Warning message:
In FUN(X[[i]], ...) : Package '' not available in repository or locally
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 magrittr_1.5 tools_3.4.0 yaml_2.1.14 stringi_1.1.5
[6] knitr_1.15.1 stringr_1.2.0 packrat_0.4.8-1 evaluate_0.10
非常感谢任何帮助。我想重新克隆来自github的repo,但这将涉及从目前尚未进行版本控制的各种目录中复制大量文件。
谢谢!