6

So I'm writing an R package. Part of the essential documentation is the DESCRIPTION file. In this DESCRIPTION file there is a line where one must specify the Licensing of the package for CRAN-sharability purposes.

I've tried inputting the license in any and every format I can think of, but it still fails when performing R CMD check --as-cran, stating

* checking DESCRIPTION meta-information ... WARNING Non-standard license specification: What license is it under? Standardizable: FALSE

So far I've tried:

License: GPL (>=3) License: GPL-3: License: GPL_3 License: GNU Affero General Public License License: GPL

and all of them throw the same error. What, in the name of all that is sacred, is the way this sneaky string is supposed to look like?

DESCRIPTION FILE:

Package: lucas
Type: Package
Title: Package to download and create the DB of LUCAS data harmonized
Version: 1.0
Date: 2020-04-28
Authors@R: c(person("Mom", "Iork", email = "[email protected]", role = c("aut")), person("La", "Ma", email = "[email protected]", role = c("cre")))
Maintainer: Jane Doe <[email protected]>
Authors: Mom Iork <[email protected]>, Jane Doe <[email protected]>, John Doe <[email protected]>
Description: Package to reproduce the harmonized DB of LUCAS points
Depends:
    R (>= 3.4),
    RPostgreSQL,
    rpostgis,
    plyr,
    stringr
Imports:
    RPostgreSQL,
    rpostgis,
    plyr,
    stringr
License: GPL (>=3)
LazyData: TRUE
RoxygenNote: 7.1.0
Encoding: UTF-8
5
  • 1
    It seems the check is done with the tools:::.check_package_license() function. Can you provide a complete DESCRIPTION file that can be used for testing?
    – MrFlick
    Commented Apr 28, 2020 at 16:08
  • Added to the original post.
    – Momchill
    Commented Apr 28, 2020 at 16:10
  • 2
    Actually, the real checking seems to happen in tools:::analyze_license("GPL (>=3)") and your license passes that check. When I run the checker on your sample file it passes just fine. What version of R are you running? Are you sure this is the file it's checking? The error message should print the bad value and since there is nothing there it's like the DESCRIPTION file cant be parsed or something.
    – MrFlick
    Commented Apr 28, 2020 at 16:18
  • Oooook, you were right, it wasn't pointing to the right place. Thanks!
    – Momchill
    Commented Apr 28, 2020 at 17:46
  • Important to say that the check happens to the already zipped tarball so any changes to the package or documentation thereof require a new compilation (build and install) before running check again.
    – Momchill
    Commented Apr 28, 2020 at 18:23

1 Answer 1

2

For anyone still looks for answer. Use functions in usethis package https://usethis.r-lib.org/reference/licenses.html

For example, use_gpl_license().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.