I am building an R package and in its documentation I included an example that uses two datasets (let's call them dataset1
and dataset2
).
I am now trying to write a documentation for these two datasets.
To achieve this, I saved the two datasets in the "data" subfolder with names dataset1.RData
and dataset2.RData
using the save()
function, and also created and a file named data.R
in the "man" folder with the following content:
#' Title for dataset 1
#'
#' description for dataset1
#'
#' @name dataset1
#' @keywords dataset1
#' @docType data
#' @format An S4 object of class RasterLayer.
#' @details
#' details for dataset1
#'
"dataset1"
#' Title for dataset 2
#'
#' description for dataset1
#'
#' @format An S4 object of class SpatialPolygonsDataFrame.
#' @name dataset2
#' @docType data
#' @details
#' details for dataset2
#' \describe{
#' \item{name_column_1}{description of column1}
#' \item{name_column_1}{description of column1}
#' }
#'
"dataset2"
My package and the included examples check fine without any errors or warnings. However, when I run ?dataset1
or ?dataset2
I get the following message:
No documentation for ‘dataset1’ in specified packages and libraries: you could try ‘??dataset1’
I there anything I am doing wrong?