[R-pkg-devel] LICENSE file in an R package for CRAN submission
Vincent Goulet
v|ncent@gou|et @end|ng |rom me@com
Wed Aug 16 18:25:58 CEST 2023
Although late to the party, I thought I might chime in with a different take on the question.
Most answers seem to pertain to the actual license used for the package. For my part, I read the question as: "GitHub wants me to have a LICENSE file at the root of the repository, but R CMD check complains about it. What should I do?"
If you need to use the LICENSE file in your package, Ben Bolker already pointed you at the correct way to do it.
If the file is just there to please GitHub (and in any case), here's what I tend to do: put the source code of your package in a subdirectory (say 'src') of the repository. You may then put the GitHub files (README.md, LICENSE, whatever else) at the top level without interfering with R CMD build/check. The added benefit is that you will then build the package in the directory of the project (say 'mypkg') with 'R CMD build src' and end up with a file .../mypkg/mypkg_x.y-z.tar.gz, rather than in the parent directory of 'mypkg'.
(Mind you, I build my packages manually. The tidyverse tools may very well take care of this sort of things automatically and I wouldn't know.)
Hope this helps,
v.
Vincent Goulet
Professeur titulaire
École d'actuariat, Université Laval
> Le 9 août 2023 à 11:06, Emanuele Cordano <emanuele.cordano using gmail.com> a écrit :
>
> Dear list,
>
> is there a way to put the LICENSE file within an R package like in Github,
> I have an R package on Github with a a LICENSE file compliant to Github and
> containing the text of the licence citing in the DESCRIPION file. But when
> I check the package , I obatained the following output:
>
> * checking top-level files ... NOTE
> File
> LICENSE
>
> is not mentioned in the DESCRIPTION file.
>
> How can I solve this?
> Thank you
> best
> Emanuele Cordano
> --
> Emanuele Cordano, PhD
> Environmental Engineer / Ingegnere per l' Ambiente e il territorio nr.
> 3587 (Albo A - Provincia di Trento)
> cell: +39 3282818564
> email: emanuele.cordano using gmail.com,emanuele.cordano using rendena100.eu,
> emanuele.cordano using eurac.edu
> PEC: emanuele.cordano using ingpec.eu
> URL: www.rendena100.eu
> LinkedIn: https://www.linkedin.com/in/emanuele-cordano-31995333
> GitHub: https://github.com/ecor
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
More information about the R-package-devel
mailing list