build R pacakge for windows -ERROR: compilation failed for package xxx -
i having trouble build dummy testing package r on windows. testing purpose,in r terminal, input:
a=rnorm(10) package.skeleton("pkgtest")
then run r cmd check pkgtest
on dummy package , got error like
* using r version 2.12.0 (2010-10-15) * using platform: i386-pc-mingw32 (32-bit) * using session charset: iso8859-1 * checking file 'pkgtest/description' ... ok * checking extension type ... package * package 'pkgtest' version '1.0' * checking package dependencies ... ok * checking if source package ... ok * checking executable files ... ok * checking whether package 'pkgtest' can installed ... error installation failed.
edit,the full log file:
* 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 warning. consult user's guide more details posix paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames error: compilation failed package 'pkgtest' `* removing 'c:/docume~1/xxxx'`
that all. have data a
in data folder, not empty. rd file can compile pdf rcmd rd2pdf
, title not empty.
did missing basic error? have rtools2.12 installed. have package inline
, rcpp
intalled , running examples fine. test r environment setup, downloaded rcpp source package , did r cmd check
on rcpp
, went fine.
yes, lot if did steps documented above.
firstly, did output package.skeleton
asks to?:
> a=rnorm(10) > package.skeleton("pkgtest") creating directories ... creating description ... creating read-and-delete-me ... saving functions , data ... making files ... done. further steps described in './pkgtest/read-and-delete-me'.
in particular last line.
you don't quote full check log, get:
$ r cmd check pkgtest * checking 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 file 'pkgtest/description' ... ok * checking extension type ... package * package 'pkgtest' version '1.0' * checking package dependencies ... ok * checking if source package ... ok * checking executable files ... ok * checking whether package 'pkgtest' can installed ... error installation failed. see '/home/gavin/tmp/pkgtest.rcheck/00install.out' details.
so should go , check contents of .out
file mentions. have following in file:
$ cat /home/gavin/tmp/pkgtest.rcheck/00install.out * install options ' --no-html' * installing *source* package ‘pkgtest’ ... ** r ** data ** preparing package lazy loading ** warning: ./man/pkgtest-package.rd:34: text must in section warning: ./man/pkgtest-package.rd:35: text must in section *** installing indices error in rd_info(db[[i]]) : rd files must have non-empty \title. see chapter 'writing r documentation' in manual 'writing r extensions'. * removing ‘/home/gavin/tmp/pkgtest.rcheck/pkgtest’
which self-explanatory, once @ package source.
you needed @ least:
> a=rnorm(10) > package.skeleton(name = "pkgtest", list = "a")
and should note have edit rd files. design feature prompt()
, package.skeleton()
not create valid rd files package authors write minimum documentation packages.
Comments
Post a Comment