使用R studio,我开始一个新的R项目。 构建内置的“Hello,world”示例运行正常。但当我尝试检查包时,我得到了这个:
* using log directory 'C:/D-data/projects/mypackage.Rcheck'
* using R version 3.2.2 (2015-08-14)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
* using option '--as-cran'
* checking for file 'mypackage/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'mypackage' version '0.1'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'mypackage' can be installed ... ERROR
Installation failed.
See 'C:/D-data/projects/mypackage.Rcheck/00install.out' for details.
* DONE
Status: 1 ERROR
Warning: running command '"C:/R/R-3.2.2/bin/i386/Rcmd.exe" INSTALL -l "C:/D-data/projects/mypackage.Rcheck" --no-html "C:\D-data\projects\mypackage.Rcheck\00_pkg_src\mypackage"' had status 1
See
'C:/D-data/projects/mypackage.Rcheck/00check.log'
for details.
Error: Command failed (1)
Execution halted
Exited with status 1.
但是当我在命令提示符下运行假定失败的命令时,它运行正常:
* DONE (mypackage)
我的会话信息:
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252
attached base packages:
[1] datasets utils grDevices graphics grid stats methods base
other attached packages:
[1] mypackage_0.1 ecb_0.1 readr_0.1.1 magrittr_1.5 tidyr_0.2.0 rvest_0.2.0 gridExtra_2.0.0 RCurl_1.95-4.7
[9] bitops_1.0-6 httr_1.0.0 knitr_1.11 dplyr_0.4.2 MASS_7.3-43 lubridate_1.3.3 RODBC_1.3-12 scales_0.2.5
[17] ggthemes_2.2.1 stringr_1.0.0 plyr_1.8.3 Hmisc_3.16-0 Formula_1.2-1 survival_2.38-3 lattice_0.20-33 ggplot2_1.0.1
[25] reshape2_1.4.1
loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-2 digest_0.6.8 R6_2.1.1 splines_3.2.2 assertthat_0.1 munsell_0.4.2
[7] proto_0.3-10 nnet_7.3-10 acepack_1.3-3.3 DBI_0.3.1 stringi_0.5-5 gtable_0.1.2
[13] colorspace_1.2-6 foreign_0.8-66 tools_3.2.2 parallel_3.2.2 cluster_2.0.3 memoise_0.2.1
[19] rpart_4.1-10 Rcpp_0.12.0 latticeExtra_0.6-26