为Windows创建R pacakge -ERROR:包xxx的编译失败
|
我无法在
Windows上为R构建虚拟测试包.
a=rnorm(10)
package.skeleton("pkgtest")
然后我在这个虚拟包上运行R CMD检查pkgtest并得到错误 * using R version 2.12.0 (2010-10-15) * using platform: i386-pc-mingw32 (32-bit) * using session charset: ISO8859-1 * checking for file 'pkgtest/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'pkgtest' version '1.0' * checking package dependencies ... OK * checking if this is a source package ... OK * checking for executable files ... OK * checking whether package 'pkgtest' can be installed ... ERROR Installation failed. 编辑,完整的日志文件: * installing *source* package 'pkgtest' ...
** libs
cygwin warning:
MS-DOS style path detected: C:/R/R-212~1.0/etc/i386/Makeconf
Preferred POSIX equivalent is: /cygdrive/c/R/R-212~1.0/etc/i386/Makeconf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
ERROR: compilation failed for package 'pkgtest'
`* removing 'C:/DOCUME~1/xxxx'`
就这些.我在数据文件夹中有一个数据,所以它不是空的. Rd文件实际上可以通过Rcmd rd2pdf编译为pdf,其标题不为空. 我错过了一些非常基本的错误吗?我安装了Rtools2.12.我甚至有包内联和Rcpp安装并运行示例很好. 首先,你是否按照package.skeleton的输出要求你这样做?: > a=rnorm(10)
> package.skeleton("pkgtest")
Creating directories ...
Creating DESCRIPTION ...
Creating Read-and-delete-me ...
Saving functions and data ...
Making help files ...
Done.
Further steps are described in './pkgtest/Read-and-delete-me'.
特别是最后一行. 你没有引用完整的CHECK日志,我得到: $R CMD check pkgtest * checking for working pdflatex ... OK * using log directory '/home/gavin/tmp/pkgtest.Rcheck' * using R version 2.11.1 Patched (2010-08-17 r52767) * using session charset: UTF-8 * checking for file 'pkgtest/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'pkgtest' version '1.0' * checking package dependencies ... OK * checking if this is a source package ... OK * checking for executable files ... OK * checking whether package 'pkgtest' can be installed ... ERROR Installation failed. See '/home/gavin/tmp/pkgtest.Rcheck/00install.out' for details. 所以你应该去检查它提到的.out文件的内容.我在该文件中有以下内容: $cat /home/gavin/tmp/pkgtest.Rcheck/00install.out * install options are ' --no-html' * installing *source* package ‘pkgtest’ ... ** R ** data ** preparing package for lazy loading ** help Warning: ./man/pkgtest-package.Rd:34: All text must be in a section Warning: ./man/pkgtest-package.Rd:35: All text must be in a section *** installing help indices Error in Rd_info(db[[i]]) : Rd files must have a non-empty title. See chapter 'Writing R documentation' in manual 'Writing R Extensions'. * removing ‘/home/gavin/tmp/pkgtest.Rcheck/pkgtest’ 一旦你看到包源,这是相当不言自明的. 你至少需要: > a=rnorm(10) > package.skeleton(name = "pkgtest",list = "a") 然后你应该注意,你必须编辑Rd文件.这是一个设计特性,prompt()和package.skeleton()不会创建有效的Rd文件,以使包作者编写其包的最低文档. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
