我只是想从源代码构建一些软件包并遇到错误
错误:“tools :::。test_load_package('rbenchmark', “\ per-homedrive1.corp.something.org/homedrive$/Tommy.O'Dell“
以下完整输出:
C:\ROracle>R CMD INSTALL --build --merge-multiarch rbenchmark_1.0.0.tar.gz
install for i386
* installing to library '\\per-homedrive1.corp.something.org/homedrive$/Tommy.O'Dell/R/win-library/2.15'
* installing *source* package 'rbenchmark' ...
** package 'rbenchmark' successfully unpacked and MD5 sums checked
** R
** demo
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: unexpected symbol in "tools:::.test_load_package('rbenchmark', '\\per-homedrive1.corp.something.org/homedrive$/Tommy.O'Dell"
Execution halted
ERROR: loading failed
* removing '\\per-homedrive1.corp.something.org/homedrive$/Tommy.O'Dell/R/win-library/2.15/rbenchmark'
'
的撇号(O'Dell
)吗?R CMD INSTALL
中的参数吗?以下是.libPaths()
[1] "\\\\per-homedrive1.corp.something.org/homedrive$/Tommy.O'Dell/R/win-library/2.15"
[2] "C:/Program Files/R/R-2.15.2/library"
[3] "C:/Program Files/RStudio/R/library"
答案 0 :(得分:0)
正如我所看到的,错误来自撇号 - R不知道这不会结束路径,而是它的一部分。没有它尝试它,我猜它应该工作。一种解决方案也可能是使用这种引用而不是" "
,也许这也可以解决,因为撇号不会再结束了......
编辑:为了通过命令行通过命令行将程序包foo
安装到命令行,您可以使用
R CMD build foo
R CMD INSTALL -l /home/daniel/myPkg/ foo_1.0.tar.gz
这意味着在你的情况下这应该有效:
R CMD INSTALL --build --merge-multiarch -l C:/Program Files/RStudio/R/library rbenchmark_1.0.0.tar.gz