0

I have created a package using devtools and roxygen2, which works perfectly fine. Now I want to include two data frames termed mydata1 and mydata2 into the package.

I have saved the data frames in mypackage/data as mydata1.rda and mydata2.rda using devtools::use_data(mydata1, mydata2)

Then I created a mydata1.R and mydata2.R files in mypackage, which contains the description as follows:

#' My temperature data
#'
#' A dataset containing the temperature 
#'
#' @format A data frame with 153 rows and 1 variable:
#' \describe{
#'   \item{temperature}{relative air temperature in degree Celsius}
#' }
"mydata1"

However, after I install and restart in the package build mode, I cannot access the description via help(mydata1). I can access the data via mypackage::mydata1 though.

What am I doing wrong? It might be a stupid mistake, however, I could not find a solution so far. Thank you very much in advance.

  • Did you set `LazyData: true` in the `DESCRIPTION`? https://stackoverflow.com/questions/11772156/exporting-data-in-roxygen2-so-that-they-are-available-without-requiring-data – MrFlick Nov 28 '18 at 15:40
  • Hi MrFlick, sorry I haven't see your comment. Yes, I did. – Anna Räsch Dec 07 '18 at 10:15

1 Answers1

0

Ok I found the solution, I just needed to save the description files in mypackage/R and not in mypackage.