[R-pkg-devel] Copyright of code "borrowed" from the stats package

Matt Denwood md @end|ng |rom @und@ku@dk
Wed Oct 16 13:04:41 CEST 2019


I needed a basic optimisation routine in some C-level code within an R package I am developing, and the Brent_fmin function from R/src/library/stats/src/optimize.c was a good starting point for me to modify.  The original file contains:

	/*
	 *  R : A Computer Language for Statistical Data Analysis
	 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
	 *  Copyright (C) 2003-2004  The R Foundation
	 *  Copyright (C) 1998--2014  The R Core Team
	 *
	 *  This program is free software; you can redistribute it and/or modify
	 *  it under the terms of the GNU General Public License as published by
	 *  the Free Software Foundation; either version 2 of the License, or
	 *  (at your option) any later version.
	 *
	<SNIP>

	/* Formerly in src/appl/fmim.c */
	/* fmin.f -- translated by f2c (version 19990503).*/
	/* R's  optimize() :   function	fmin(ax,bx,f,tol)
	   =    ==========		~~~~~~~~~~~~~~~~~

	<SNIP>

	        This function subprogram is a slightly modified  version  of  the
	    Algol  60 procedure  localmin  given in Richard Brent, Algorithms for
	    Minimization without Derivatives, Prentice-Hall, Inc. (1973).
	*/

	static
	double Brent_fmin(double ax, double bx, double (*f)(double, void *),
			  void *info, double tol)

I just use this Brent_fmin function within my package - nothing else from stats.  Obviously I want to make sure that my package attributes copyright correctly, which I do by licensing my package as GPL-3, and retaining the preamble from stat’s optimize.c along with a more detailed description of where it came from and what has been modified.  I will also include in my DESCRIPTION file:

	author(given=??, family=??, role=“cph”, comment="Original copyright holder of the code in /src/optimize.cc”)

But which of the following is the actual copyright holder:

	a)  Richard Brent
	b)  Robert Gentleman and Ross Ihaka
	c)  The R Foundation
	d)  R Core Team
	e)  All (or some other combination) of the above

I am leaning towards just (d) as the author/copyright holder of the stats package, but am not sure if it should (also?) be (a)?  I would appreciate any opinions on this.

Thanks in advance,

Matt


-----

Matthew Denwood
Associate Professor in Quantitative Veterinary Epidemiology and Biostatistics
Faculty of Health and Medical Sciences
University of Copenhagen



More information about the R-package-devel mailing list