I have a package with a couple of included datasets, and I'm getting a persistent warning on running check()
:
R> check()
...
-- R CMD check results -------------------------------------------------- SAR 1.0.3 ----
Duration: 2m 18.5s
> checking for code/documentation mismatches ... WARNING
Variables with usage in documentation object 'ms_catalog' but not in code:
'ms_catalog'
Variables with usage in documentation object 'ms_usage' but not in code:
'ms_usage'
The datasets in question are a couple of .Rdata files, and the documentation is just this:
#' Sample usage dataset
#'
#' Dataset of anonymised transaction records from the Microsoft online store.
#' @format A data frame with 118383 rows and 3 columns.
#' \describe{
#' \item{user}{The user ID.}
#' \item{item}{The item ID, corresponding to the items in the [ms_catalog] dataset.}
#' \item{time}{The date and time of the transaction, in POSIXct format.}
#' }
#' @source Microsoft.
#' @seealso
#' [ms_catalog]
"ms_usage"
#' Sample catalog dataset
#'
#' Dataset of item descriptions from the Microsoft online store.
#' @format A data frame with 101 rows and 3 columns.
#' \describe{
#' \item{item}{The item ID, corresponding to the items in the [ms_usage] dataset.}
#' \item{name}{A short description of the item.}
#' \item{category}{The item category.}
#' }
#' @source Microsoft.
#' @seealso
#' [ms_usage]
"ms_catalog"
As far as I can tell, this is the recommended way of documenting datasets with Roxygen, and the generated Rd files also conform to what's specified in "Writing R Extensions". What am I doing wrong?
I'm running R 4.0.2, on Windows 10. This problem didn't occur when I was using R 3.x.