[Rd] package.skeleton leads to R CMD check aborting
Dirk Eddelbuettel
edd at debian.org
Thu Dec 11 13:53:06 CET 2014
The package.skeleton() base function is useful for creating empty packages.
The fact that the help files generated by the function cause errors was long
an annoyance, but I noticed last month (while preparing for a workshop on R
and packages) that it creates packages which cause 'R CMD check ...' to die
in error. Which is always a bug.
I just verified that it still dies in error under R-devel, and filed bug
report 16105 at the bugzilla instance. See below for a session log.
As a bug reporter, I should offer help. I do, though somewhat hesitantly as
package.skeleton() has gotten a bit complicated over the years. But if a
patch simplifying the output of a simple default package is of interest I
will work on it.
Dirk
edd at max:/tmp$ rm -rf demo/
edd at max:/tmp$ mkdir demo && cd demo
edd at max:/tmp/demo$ R-devel.sh
R Under development (unstable) (2014-12-09 r67142) -- "Unsuffered Consequences"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
John Kane: I have 120 columns in a data.frame. I have one value in a column named "blaw" that I want to change. How do I find the coordinates?
Roger Koenker: It is the well-known wicked which problem: If you had (grammatically incorrectly) thought "... which I want to change" then you might have
been led to type (in another window):
?which
and you would have seen the light. Maybe that() should be an alias for which()?
-- John Kane and Roger Koenker
R-help (August 2006)
R> package.skeleton("quickDemo")
Creating directories ...
Creating DESCRIPTION ...
Creating NAMESPACE ...
Creating Read-and-delete-me ...
Saving functions and data ...
Making help files ...
Done.
Further steps are described in './quickDemo/Read-and-delete-me'.
R> q()
edd at max:/tmp/demo$ R-devel.sh CMD build quickDemo
* checking for file ‘quickDemo/DESCRIPTION’ ... OK
* preparing ‘quickDemo’:
* checking DESCRIPTION meta-information ... OK
* installing the package to process help pages
* saving partial Rd database
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ‘quickDemo_1.0.tar.gz’
edd at max:/tmp/demo$ R-devel.sh CMD check quickDemo_1.0.tar.gz
* using log directory ‘/tmp/demo/quickDemo.Rcheck’
* using R Under development (unstable) (2014-12-09 r67142)
* using platform: x86_64-unknown-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘quickDemo/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘quickDemo’ version ‘1.0’
* 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 for sufficient/correct file permissions ... OK
* checking whether package ‘quickDemo’ can be installed ... WARNING
Found the following significant warnings:
Warning: /tmp/Rtmp3vskac/Rbuild4e1945bdc52a/quickDemo/man/quickDemo-package.Rd:26: All text must be in a section
See ‘/tmp/demo/quickDemo.Rcheck/00install.out’ for details.
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... WARNING
Non-standard license specification:
What license is it under?
Standardizable: FALSE
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... WARNING
prepare_Rd: quickDemo-package.Rd:26: All text must be in a section
* checking Rd metadata ... OK
* checking Rd cross-references ... WARNING
Unknown package ‘<pkg>’ in Rd xrefs
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... WARNING
Warning: parse error in file 'quickDemo-Ex.R':
20:11: unexpected symbol
19:
20: ~~ simple examples
^
* checking examples ... ERROR
Running examples in ‘quickDemo-Ex.R’ failed
The error most likely occurred in:
> ### Name: quickDemo-package
> ### Title: What the package does (short line)
> ### Aliases: quickDemo-package quickDemo
> ### Keywords: package
>
> ### ** Examples
>
> ~~ simple examples of the most important functions ~~
Error: unexpected symbol in "~~ simple examples"
Execution halted
edd at max:/tmp/demo$
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the R-devel
mailing list