s460
s460

Reputation: 507

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

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.

Upvotes: 21

Views: 2281

Answers (3)

Friedrich Nietzsche
Friedrich Nietzsche

Reputation: 151

Just add the line

LazyDataCompression:xz

to your description file. It worked for me, without deleting LazyData: True, which might be needed to automatically load the data when the package is installed.

Upvotes: 0

s460
s460

Reputation: 507

I removed the line

LazyData: True

From my DESCRIPTION file

Upvotes: 27

Dirk is no longer here
Dirk is no longer here

Reputation: 368221

Over the course of time, policy settings change. Changes are first implemented in r-devel which is why you see this at win_devel.

This particular change ... was added last week. One way to stay abreast of such changes is to follow the auto-generated 'blog' of changes here https://developer.r-project.org/blosxom.cgi/R-devel/NEWS

I actually just helped a friend on this issue this weekend and took this screenshot from the Feedly RSS feed reader I use:

enter image description here

(The underlining is a formatting artyfact we can ignore).

But in short, you need to check against r-devel, and you actually promise to CRAN each time you upload that you did :)

Upvotes: 22

Related Questions