devtool::check() halted

Hi,

When I run devtool::check() for my package, it is always halted with the following message

Could anybody help me dissect where the issue is? Thanks!

Is the source of your package public?

This is probably coming from R CMD check and not devtools. It seems that it needs the du Unix command, so you can install that if you don't have it. It does not seem that there is a way around it.

1 Like

Hi,

It's easier to help debug these errors if you can paste the text as text rather than a screenshot whenever possible.

Have you successfully built other packages from source? This error is coming from running the du -k command when building an R package which is to check its size in kilobytes, because there is a size limit on packages.

If you are on Windows, you will need to install rtools. If on macOS you will need the command line tools for Xcode.

1 Like

Thank you all for your great reply. The problem has been solved. It was because some security configuration blocked Rtools from running properly. I will copy and paste the error messages rather than have a screenshot in the future. Here is a quick question after carrying out devtool::check():

> checking top-level files ... NOTE
  File
    LICENSE
  is not mentioned in the DESCRIPTION file.
  Non-standard files/directories found at top level:
    'README.Rmd' 'README_files'

The LICENSE has already mentioned in the DESCRIPTION file, which is why the note is confusing. Could you please let me know what happened?

1 Like

My license shows up on the DESCRIPTION file:

License: GPL (>= 3)

When I put GPL (>= 3) + file LICENSE, the note goes away. I guess this is some kind of new requirement, as a lot of packages don't have + file ... after the license.

That's confusing indeed. You don't need a separate LICENSE file if your license is GLP-3, remove it.

You also cannot put README.Rmd and README_files in the package so add these two lines to the .Rbuildignore file:

^README[.]Rmd$
^README_files$
^LICENSE$

(You can also add LICENSE here, if you don't want to delete it from the repository.)

1 Like

use_gpl_license() gives GPL (>= 3) by default.

That's perfectly fine if that's your license of choice, but the CRAN policy is that GPL-3 packages should not have a LICENSE file in the package. You can still have it in the repository, though, if you want, hence my advice re. .Rbuildignore.

The ggrepel package has | file LICENSE. https://github.com/slowkow/ggrepel/blob/master/DESCRIPTION

Could you find the CRAN policy you mentioned?

That package has

License: GPL-3 | file LICENSE

which means a dual license, either GPL-3 or as written in the LICENSE file.

The policy is in "Writing R Extensions" and the "CRAN repository policy".

Thank you. I followed your advice by inserting ^LICENSE$ into .Rbuildignore and removing + file LICENSE. The only thing left is License: GPL (>= 3). Could you please confirm this is the right thing to do? Anything else I need to adjust?

If R CMD check --as-cran is clean, then you are good.

Thanks, R CMD check --as-cran is equivalent to devtools::check(cran = TRUE), right?

Probably. devtools sets a bunch of other options, so maybe not exactly. But either one is good, nevertheless. CRAN will run their own incoming checks, anyway.

1 Like

This topic was automatically closed after 45 days. New replies are no longer allowed.


If you have a query related to it or one of the replies, start a new topic and refer back with a link.