[Rd] Citation if copying R base code

Duncan Murdoch murdoch.duncan at gmail.com
Thu Nov 6 12:36:42 CET 2014

On 06/11/2014, 5:57 AM, Peter Meissner wrote:
> Dear Listeners,
> ... also I read the CRAN policies and tried to solve those questions 
> myself I feel very much in the need of good advise ...
> I am currently finishing a package that -- to solve some nasty problems 
> with dirty data -- uses its own as.Date() equivalent methods (i.e. its 
> own generic and methods).
> Thereby, I shamelessly copied code from the as.Date() methods from the 
> base package and only made some minor adjustments.

There's no problem doing that, as long as you respect the license.  That
includes keeping the copyright notices from the files where you found
the code:  see the GPL

> For my main achievement was copy-pasting I feel obliged to cite the 
> efforts made by base package authors - do I, should I? Currently I only 
> use the help files to mention that the generic and its methods are 
> basically the same as as.Date(), except this and that.

In your package help file it would be polite to describe the
contributions from the R source code.  In the DESCRIPTION file, the rule
is that all "significant" contributors must be included.  You'll need to
judge that, but from your description, I'd guess this counts.

> And if yes how to do it best? What is the standard procedure here? 
> Should I include base package authors as contributors in DESCRIPTION???
> Am I allowed to use MIT + file license with that or is it wrong to do so?

No, you must use the GPL, since the code you copied is licensed under
the GPL.  You can choose to use version 2 or 3 (or both).  You do not
have permission to re-license R code under a different license.

Duncan Murdoch

> I appreciate any advise on these (I think important) but very confusing 
> matters of referencing and licensing.
> Best, Peter
> PS:
> - My current description:
> https://github.com/petermeissner/wikipediatrend/blob/master/DESCRIPTION
> - the package specific as.Date() implementation:
> https://github.com/petermeissner/wikipediatrend/blob/master/R/wp_date.R
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list