[R-pkg-devel] Properly referencing copied code

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Sat Jul 13 12:24:36 CEST 2024



> On 12 Jul 2024, at 10:07, Ivan Krylov via R-package-devel <r-package-devel using r-project.org> wrote:
> 
> В Thu, 11 Jul 2024 20:58:53 +0000
> DRC via R-package-devel <r-package-devel using r-project.org> пишет:
> 
>> 1. How does linking to external libs differ from providing the source
>> of a library and linking against that?
> 
> I think that the author information in the DESCRIPTION is about what your package provides by itself, not everything that may end up in the address space once the package is loaded. Since CRAN prefers self-contained packages, we end up including them in our packages (unless the third-party library is already very common and present in RTools & macOS recipes & common GNU/Linux distros), which requires us to specify their authors.
> 


To clarify: as far as CRAN is concerned you only need to include sources that are otherwise not commonly available - or if you need to modify them for the purpose of the package, so it should be quite rare. In fact the CRAN policy states that a package should always look for an available library first. If we just are talking about libraries then a very rough rule of thumb is that if your dependent library is in Debian then you don't need to ship it as sources.

That said, if you are using something that is not in the current Rtools/recipes then you have to tell CRAN so we can be add it to macOS and Windows toolchains (assuming both are supported by the library you need) - but that doesn't mean you should ship them yourself (in fact that tends to cause a lot more problems).

Cheers,
Simon



More information about the R-package-devel mailing list