[R-pkg-devel] check --as-cran error on Rd file
Charles Geyer
ch@r||e @end|ng |rom @t@t@umn@edu
Fri Mar 13 18:49:24 CET 2020
Sorry for the late reply. I am getting ready to have courses on-line only.
Executive summary. Problem fixed, solution at bottom after some
wandering around.
sped.Rcheck/00install.out says (among other blather, no warnings or errors)
byte-compile and prepare package for lazy loading
so that doesn't appear to be the issue. Moreover changing
"data(alberta)" in the example on the help page to just "alberta" (no
"data") does not make the error go away. Moreover, when I run the
package installed by R CMD check I get no errors
blurfle$ ~/local/devel/bin/R --vanilla
R Under development (unstable) (2020-03-10 r77920) -- "Unsuffered Consequences"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-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.
> library(sped, lib.loc = "sped.Rcheck")
> data(alberta)
> head(alberta)
ind pa ma
[1,] 58 11 12
[2,] 100 39 40
[3,] 101 39 40
[4,] 103 39 40
[5,] 107 39 100
[6,] 113 17 18
Oh. I see. I need to change "alberta" (with no "data") to
"data(alberta)" in the usage section and in the examples section.
Then the problem goes away.
Thanks for the help.
On Wed, Mar 11, 2020 at 3:57 PM Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
>
> On 11/03/2020 11:44 a.m., Charles Geyer wrote:
> > blurfle$ cat sped.Rcheck/00check.log
> > * using log directory ‘/home/geyer/Software/sped/package/sped.Rcheck’
> > * using R Under development (unstable) (2020-03-10 r77920)
> > * using platform: x86_64-pc-linux-gnu (64-bit)
> > * using session charset: UTF-8
> > * using option ‘--as-cran’
> > * checking for file ‘sped/DESCRIPTION’ ... OK
> > * this is package ‘sped’ version ‘0.1’
> > * checking CRAN incoming feasibility ... NOTE
> > Maintainer: ‘Charles J. Geyer <charlie using stat.umn.edu>’
> >
> > New submission
> > * 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 serialization versions ... OK
> > * checking whether package ‘sped’ can be installed ... OK
> > * checking installed package size ... OK
> > * checking package directory ... OK
> > * checking for future file timestamps ... OK
> > * checking DESCRIPTION meta-information ... OK
> > * 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 use of S3 registration ... 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 ... OK
> > * checking Rd metadata ... OK
> > * checking Rd line widths ... OK
> > * checking Rd cross-references ... OK
> > * checking for missing documentation entries ... OK
> > * checking for code/documentation mismatches ... WARNING
> > Variables with usage in documentation object 'alberta' but not in code:
> > ‘alberta’
> >
> > * checking Rd \usage sections ... OK
> > * checking Rd contents ... OK
> > * checking for unstated dependencies in examples ... OK
> > * checking contents of ‘data’ directory ... OK
> > * checking data for non-ASCII characters ... OK
> > * checking data for ASCII and uncompressed saves ... OK
> > * checking line endings in C/C++/Fortran sources/headers ... OK
> > * checking line endings in Makefiles ... OK
> > * checking compilation flags in Makevars ... OK
> > * checking for GNU extensions in Makefiles ... OK
> > * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
> > * checking use of PKG_*FLAGS in Makefiles ... OK
> > * checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
> > * checking pragmas in C/C++ headers and code ... OK
> > * checking compilation flags used ... OK
> > * checking compiled code ... OK
> > * checking examples ... OK
> > * checking for unstated dependencies in ‘tests’ ... OK
> > * checking tests ... OK
> > Running ‘foo.R’
> > * checking PDF version of manual ... OK
> > * checking for non-standard things in the check directory ... OK
> > * checking for detritus in the temp directory ... OK
> > * DONE
> > Status: 1 WARNING, 1 NOTE
> > blurfle$
> >
> > I do not get this warning when --as-cran is omitted. I have never seen the
> > warning before. The Rd file is
> >
> > blurfle$ cat sped/man/alberta.Rd
> > \name{alberta}
> > \docType{data}
> > \alias{alberta}
> > \title{Pedigree Data on Equus przewalskii in Alberta}
> > \description{
> > Pedigree of Asian wild horse (also called Mongolian wild horse)
> > \emph{Equus przewalskii} individuals living in Alberta, Canada in 1988.
> > }
> > \usage{alberta}
> > \format{
> > A matrix with 69 rows giving (individual, father, mother) triplets.
> > The column labels are \code{ind}, \code{pa}, and \code{ma}.
> > The names (which are numbers) are studbook numbers.
> > There are 82 individuals in this pedigree in all.
> > There are \eqn{82 - 69 = 13} founders.
> > }
> > \examples{
> > library(sped)
> > data(alberta)
> > }
> > \keyword{datasets}
> > blurfle$
> >
> > And this is AFAICS what Section 2.1.2 of Writing R Extensions (R-devel
> > version) says it should be.
> >
> > So what is this warning about?
>
> The manual says "The \usage entry is always bar or (for packages which
> do not use lazy-loading of data) data(bar). (In particular, only
> document a single data object per Rd file.)". So maybe you aren't using
> lazy loading?
>
> Duncan Murdoch
>
--
Charles Geyer
Professor, School of Statistics
Resident Fellow, Minnesota Center for Philosophy of Science
University of Minnesota
charlie using stat.umn.edu
More information about the R-package-devel
mailing list