I am trying to make an R package that contains data files.
One data file, mydata.Rd, is annotated with the following Roxygen2 code:
#' My Title
#' @docType data
#' @keywords datasets
#' @references my name
#' (\\href{https://doi.org/etc.})
#' @source \\href{https://source}
"mydata"
I get the error:
Variables with usage in documentation object 'mydata' but not in code: ‘mydata’
I've tried multiple things to fix this error. For example:
- I have checked to make sure that the DESCRIPTION has
LazyData: true
- I removed the
@usage
tag that was originally in my Roxygen2 code - I have made sure that the .Rd file and the corresponding .R file both exist.
Advice is appreciated.