[R-pkg-devel] R package NOTE: \item in \describe must have non-empty label

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Mon May 16 19:58:13 CEST 2022


\describe is not a general macro for describing the data set, it's a 
macro for a specific kind of list:

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Lists-and-tables

The \describe command is similar to \itemize but allows initial labels 
to be specified. Each \item takes two arguments, the label and the body 
of the item, in exactly the same way as an argument or value \item. 
\describe commands are mapped to <DL> lists in HTML and \description 
lists in LaTeX.

   I *think* that if you don't want to give an itemized list of the rows 
and columns you should just delete the \describe{ (and the matching }) 
entirely.

   If you don't have a local r-devel you can test your changes on 
win-builder or one of the r-hub platforms ...



On 2022-05-16 1:53 p.m., Walter, Vonn wrote:
> Hi Everyone,
> 
> The /data directory of my R package includes three objects, each of which has its own documentation in the /R and /man directories.  Running R CMD check -as-cran produces the NOTE "\item in \describe must have non-empty label." I get this NOTE for each of these three objects.  The first two objects are numeric matrices (luadSubset and luscSubset).  The documentation for each matrix includes a \describe field (see below for luadSubset... luscSubset is essentially the same), but I do not have an \item inside \describe because the object is not a data frame.  This *seems* correct because distinct columns correspond to data from different subjects, not different variables.  However, I could be wrong.  Here's some of the documentation from luadSubset.R:
> 
> #' @format A numeric matrix of quantitative DNA copy number values with 3475 rows and 65 columns.
> #'   \describe{
> #'                            Rows are indexed by genes, and columns are indexed by samples.  The entries are on the log
> #'            ratio scale and were produced by the GISTIC pipeline.
> #'                            }
> #'
> #' @source \url{https://gdac.broadinstitute.org/}
> 
> The third object is a list (pD), and inside the \describe field I have \item fields for list item, as shown below.  Here's some of the documentation from pD.R:
> 
> #' @format A list containing three components for a common set of genes:
> #' \describe{
> #'   \item{X}{DNA copy number data for lung adenocarcinoma}
> #'   \item{Y}{DNA copy number data for lung squamous cell carcinoma}
> #'   \item{posDT}{Gene position data}
> #' }
> 
> Any help would be greatly appreciated.
> 
> Best,
> 
> Vonn
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics



More information about the R-package-devel mailing list