[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.
Overview:
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
'/home/woodstock/hoffmacw/R/Sources/CWHstat/man/qnorm.appr.Rd':
Following section 'arguments':
"\n\\value {\n "
See chapter 'Writing R documentation files' in manual 'Writing R
Extensions'.
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... WARNING
C) Codoc mismatches from documentation object 'my.table':
my.table.margin
Code: function(v, w)
Docs: function(m)
* checking Rd \usage sections ... OK
...
The relevant code snippets:
/CWHstat/man/qnorm.appr.Rd:
...
\arguments{
\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
'/home/woodstock/hoffmacw/R/Sources/CWHstat/man/qnorm.appr.Rd':
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:
/CWHstat/man/my.table.margin.Rd:
\name{my.table}
\alias{my.table.margin}
\usage{
my.table.margin(v,w)
my.table.margin(m)
}
\arguments{
\item{v, w}{Factors.}
\item{m}{Matrix.}
}
/CWHstat/man/my.table.margin.r:
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)
(*successful*)
Next:
-----
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'
(*successful*)
Next:
-----
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
$R_HOME/share.
F)
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.
(/usr/local/TeX/texmf/web2c/cp8bit.tcx)
entering extended mode
(./CWHstat-manual.tex
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.
(/usr/local/TeX/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/local/TeX/texmf/tex/latex/base/size10.clo)) (./Rd.sty
(/usr/local/TeX/texmf/tex/latex/base/ifthen.sty)
(/usr/local/TeX/texmf/tex/latex/tools/longtable.sty)
(/usr/local/TeX/texmf/tex/latex/tools/bm.sty)
(/usr/local/TeX/texmf/tex/latex/base/alltt.sty)
(/usr/local/TeX/texmf/tex/latex/tools/verbatim.sty)
(/usr/local/TeX/texmf-local/tex/latex/html/url.sty)
(/usr/local/TeX/texmf/tex/latex/upquote/upquote.sty)
(/usr/local/TeX/texmf/tex/latex/base/fontenc.sty
(/usr/local/TeX/texmf/tex/latex/base/t1enc.def))
(/usr/local/TeX/texmf/tex/latex/ae/ae.sty
(/usr/local/TeX/texmf/tex/latex/base/fontenc.sty
(/usr/local/TeX/texmf/tex/latex/base/t1enc.def)
(/usr/local/TeX/texmf/tex/latex/ae/t1aer.fd)))
(/usr/local/TeX/texmf/tex/latex/ae/t1aett.fd)
(/usr/local/TeX/texmf/tex/latex/graphics/color.sty
(/usr/local/TeX/texmf/tex/latex/texlive/color.cfg)
(/usr/local/TeX/texmf/tex/latex/graphics/dvips.def)
(/usr/local/TeX/texmf/tex/latex/graphics/dvipsnam.def))
(/usr/local/TeX/texmf/tex/latex/hyperref/hyperref.sty
(/usr/local/TeX/texmf/tex/latex/graphics/keyval.sty)
(/usr/local/TeX/texmf/tex/latex/hyperref/pd1enc.def)
(/usr/local/TeX/texmf/tex/latex/texlive/hyperref.cfg)
Implicit mode ON; LaTeX internals redefined
)
*hyperref using default driver hdvips*
(/usr/local/TeX/texmf/tex/latex/hyperref/hdvips.def
(/usr/local/TeX/texmf/tex/latex/hyperref/pdfmark.def))
Package hyperref Warning: Option `hyperindex' has already been used,
(hyperref) setting the option has no effect on input line
293.
Package hyperref Warning: Option `pagebackref' has already been used,
(hyperref) setting the option has no effect on input line
293.
) (./CWHstat-manual.aux)
(/usr/local/TeX/texmf/tex/latex/hyperref/nameref.sty)
! 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
http://stat.ethz.ch/CRAN/src/base/NEWS
but I cannot make sense of: `--no-codoc', because I want the check.
Thanks for any hints
Christian
--
Dr.sc.math.Christian W. Hoffmann,
http://www.wsl.ch/staff/christian.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