Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'LazyData' is specified without a 'data' directory error when submitting R package to CRAN

Tags:

cran

r-package

When I run devtools::check on my package locally, I don't get this error, but when I submit my package to CRAN, or when I run devtools::check_win_devel, I get this error:

'LazyData' is specified without a 'data' directory

I successfully submitted my package to CRAN a week or so ago and didn't get this error, all I changed was the DESCRIPTION file.

like image 968
s460 Avatar asked Mar 29 '21 19:03

s460


People also ask

What is lazydata in NYC?

If the DESCRIPTION contains LazyData: true, then datasets will be lazily loaded. This means that they won’t occupy any memory until you use them. The following example shows memory usage before and after loading the nycflights13 package. You can see that memory usage doesn’t change until you inspect the flights dataset stored inside the package.

How do I show examples of loading/parsing raw data in a package?

If you want to show examples of loading/parsing raw data, put the original files in inst/extdata. When the package is installed, all files (and folders) in inst/ are moved up one level to the top-level directory (so they can’t have names like R/ or DESCRIPTION ).

How do I store raw data in R?

If you want to store raw data, put it in inst/extdata. A simple alternative to these three options is to include it in the source of your package, either creating by hand, or using dput () to serialise an existing data set into R code. Each possible location is described in more detail below.

What does it mean to document data in R?

Documenting data is like documenting a function with a few minor differences. Instead of documenting the data directly, you document the name of the dataset and save it in R/. For example, the roxygen2 block used to document the diamonds data in ggplot2 is saved as R/data.R and looks something like this: #' Prices of 50,000 round cut diamonds.


1 Answers

I removed the line

LazyData: True

From my DESCRIPTION file

like image 171
s460 Avatar answered Nov 11 '22 16:11

s460