所以,我正在安装的github上有一个R包x
。
library(devtools)
install_github("bla/bla")
安装失败(请参阅下面的错误打印输出)。包x
包含一些依赖项,包括ggplot2
。 x
的所有依赖项都是自动安装的,包括ggplot2,但是没有安装ggplot2的包scales
。因此,它失败了。因此,不会自动安装依赖项的依赖项。
在我的说明文件中,我使用'取决于'对于ggplot2。我在ggplot2描述文件中注意到scales
在' Imports'之下,而不是'取决于'。
我知道我可以修复所有这些只是手动安装scales
,或手动安装依赖依赖项。但是,有没有办法自动安装所有依赖项? ' Depends中'和'进口'?或者我错过了什么?
请参阅下面的控制台打印:
Installing 1 package: Cairo
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/Cairo_1.5-9.zip'
Content type 'application/zip' length 1026234 bytes (1002 KB)
downloaded 1002 KB
package ‘Cairo’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\rmf\AppData\Local\Temp\Rtmp8Eaf5a\downloaded_packages
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\rmf\AppData\Local\Temp\Rtmp8Eaf5a\downloaded_packages
Installing 1 package: gridExtra
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/gridExtra_2.2.1.zip'
Content type 'application/zip' length 483300 bytes (471 KB)
downloaded 471 KB
package ‘gridExtra’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\rmf\AppData\Local\Temp\Rtmp8Eaf5a\downloaded_packages
Installing 1 package: gtable
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/gtable_0.2.0.zip'
Content type 'application/zip' length 57807 bytes (56 KB)
downloaded 56 KB
package ‘gtable’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\rmf\AppData\Local\Temp\Rtmp8Eaf5a\downloaded_packages
Installing 1 package: tidyr
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/tidyr_0.6.1.zip'
Content type 'application/zip' length 860798 bytes (840 KB)
downloaded 840 KB
package ‘tidyr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\rmf\AppData\Local\Temp\Rtmp8Eaf5a\downloaded_packages
"C:/R/R-33~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/rmf/AppData/Local/Temp/Rtmp8Eaf5a/devtools2fe8287648ea/royfrancis-test-4d3547f" --library="C:/R/R-3.3.3/library" \
--install-tests
* installing *source* package 'x' ...
** R
** inst
** tests
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'scales'
Error : package 'ggplot2' could not be loaded
ERROR: lazy loading failed for package 'x'
* removing 'C:/R/R-3.3.3/library/x'
Error: Command failed (1)
会话信息
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.12.0
loaded via a namespace (and not attached):
[1] httr_1.2.1 R6_2.2.0 tools_3.3.3 withr_1.0.2 curl_2.5 memoise_1.0.0
[7] git2r_0.18.0 digest_0.6.12