[R] Package Documentation, cryptic

Christian Hoffmann christian.hoffmann at wsl.ch
Tue Nov 9 11:40:07 CET 2004

Hi, sorry for this lengthy post.
I am using R-2.0.0 on Unix, compiled.

A) R CMD check: Unaccounted top-level text
B) In which sections of *.Rd is LaTeX notation allowed, where *not*?
C) Codoc mismatches and polyvalent parameters
D) Successful R CMD INSTALL and R CMD build
E)  cp ../Rd.sty .  is copy necessary?
F) latex ./CWHstat-manual.tex  runs into trouble

When running >R CMD check CWHstat    I get
* checking foreign function calls ... OK
* checking Rd files ... WARNING
Rd files with likely Rd problems:
Unaccounted top-level text in file 
Following section 'arguments':
"\n\\value {\n  "

See chapter 'Writing R documentation files' in manual 'Writing R
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... WARNING

C)  Codoc mismatches from documentation object 'my.table':
   Code: function(v, w)
   Docs: function(m)

* checking Rd \usage sections ... OK

The relevant code snippets:
   \item{p}{vector of probabilities.}
   \item{mean}{vector of means.}
   \item{sd}{vector of standard deviations.}
   \item{log.p}{logical; if TRUE, probabilities p are given as log(p).}
   \item{lower.tail}{logical; if TRUE (default), probabilities are P[X 
<= x], otherwise, P[X > x].}
\value {
   \code{qnorm... gives the quantile function.}
A) ------- Question:
Unaccounted top-level text in file 
Following section 'arguments':
"\n\\value {\n  "
--Question: Where in Writing .. is this topic treated? The string seems 
to come from a lower level of "check".
--Question: This error did *not* occur under 1.9.last. Does it have to 
do with [] ?

------- Question:
B) In which sections of *.Rd is LaTeX notation allowed, where *not*?

The relevant code snippets:
   \item{v, w}{Factors.}

my.table.margin <- function(v, w) {
       if (missing(w)) tab <- v else tab <- table(v, w)

C) ------- Question:
How can I document this type of behaviour of polyvalent parameters 
without "check" baulking at me?

D) Next:
hoffmacw at fluke:~/R/Sources >R CMD INSTALL --library=lib CWHstat
* Installing *source* package 'CWHstat' ...
** R
** preparing package for lazy loading

** help
  >>> Building/Updating help pages for package 'CWHstat'
      Formats: text html latex example
* DONE (CWHstat)

hoffmacw at fluke:~/R/Sources >R CMD build --force CWHstat
* checking for file 'CWHstat/DESCRIPTION' ... OK
* preparing 'CWHstat':
* removing junk files
* building 'CWHstat_4.0.4.tar.gz'

hoffmacw at fluke:~/R/Sources >cd CWHstat.Rcheck
hoffmacw at fluke:~/R/Sources/CWHstat.Rcheck >cp ../Rd.sty .

E) *comment* copy is necessary, because each run of check destroys old 
directory *.Rcheck, Is there a way around this? I cannot write to 

hoffmacw at fluke:~/R/Sources/CWHstat.Rcheck >latex ./CWHstat-manual.tex
This is e-TeXk, Version 3.141592-2.1 (Web2C 7.5.2)
  %&-line parsing enabled.
entering extended mode
LaTeX2e <2001/06/01>
Babel <v3.7j> and hyphenation patterns for english, dumylang, 
nohyphenation, ba
sque, czech, slovak, german, ngerman, spanish, catalan, french, 
ukenglish, ital
ian, dutch, polish, portuguese, russian, loaded.
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/local/TeX/texmf/tex/latex/base/size10.clo)) (./Rd.sty
Implicit mode ON; LaTeX internals redefined
*hyperref using default driver hdvips*

Package hyperref Warning: Option `hyperindex' has already been used,
(hyperref)                setting the option has no effect on input line 

Package hyperref Warning: Option `pagebackref' has already been used,
(hyperref)                setting the option has no effect on input line 

) (./CWHstat-manual.aux) 
! Undefined control sequence.
l.4 \HeaderA
             {invgauss}{Inverse Gaussian Distribution}{invgauss}
? ^C! Interruption.
<to be read again>
l.4 \HeaderA{
              invgauss}{Inverse Gaussian Distribution}{invgauss}
? x

------- Question:
F) Are these follow-up errors?

Thanks for giving me any hints. I searched

but I cannot make sense of: `--no-codoc', because I want the check.

Thanks for any hints
Dr.sc.math.Christian W. Hoffmann, 
Mathematics + Statistical Computing   e-mail: christian.hoffmann at wsl.ch
Swiss Federal Research Institute WSL  Tel: ++41-44-73922-   -77  (office)
CH-8903 Birmensdorf, Switzerland             -11(exchange), -15  (fax)

More information about the R-help mailing list