Re: [R] How can you buy R?

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Sun 21 May 2006 - 03:47:42 EST

On 5/20/06, Berwin A Turlach <berwin@maths.uwa.edu.au> wrote:
> G'day Spencer,
>
> >>>>> "SG" == Spencer Graves <spencer.graves@pdf.com> writes:
>
> SG> I'm not an attorney, but it would seem to me any code written
> SG> in R is arguably "derived from" R.
> IANAL either, and I long since stopped reading gnu.misc.discuss in
> which the interpretation of the various licences are regularly
> discussed.
>
> SG> Even if R code were not "derived from" R, I don't see how it
> SG> could "reasonably be considered independent" of R.
> R is one implementation of the S language. If the R code works
> without modification under S-PLUS (another implementation), then I
> believe you can argue that it is independent of R.
>
> On the user level, it might well be the case that most commands work
> in R and S-PLUS, but on the package developer lever there are enough
> differences that typically the same code does not work on both, R and
> S-PLUS, and that you have to make small adjustments depending on the
> package. If all R specific code is within "if(is.R())" constructs
> (and likewise for all S-PLUS specific code), then you can probably
> still argue independence.
>
> It might become trickier if you handle the R/S-PLUS specific code
> externally via Perl/Python/??? scripts and provide files with
> (slightly) different code for the R package and the S-PLUS package.
> In this case the R code for the R package is presumably derived from R
> and has to be put under the GPL.
>
> A question that always interested me was whether you can used GPL'd
> code in S-PLUS. At some point, I got the impression that according to
> the GPL the user would violate the GPL if a package contained GPL code
> (in particular C and/or FORTRAN code) that was dynamically linked into
> S-PLUS by the R code. My understanding was that in that moment a
> product was created that would have to be wholly under the GPL, so the
> user was violating the GPL and lost the write to use your package.

A user can never violate the GPL. The GPL does not govern use, it governs distribution. Specifically,

<quote>Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted...</quote>

Distribution of source is fairly straightforward (and it's perfectly fine for you to distribute source on statlib under the GPL). Things become more interesting when any one (e.g. Insightful) distributes binaries (of a package/chapter in R/S, say) under the GPL, because they are required by the GPL to supply (upon request) not only the 'source' (of the package or chapter), but also all the tools required to reproduce the binary version from the source. I'm not sure how this works in S-PLUS, but in R it would mean everything needed to do an R CMD INSTALL. There's a standard exception for this in the GPL, namely, you don't need to supply <quote>anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs</quote>. S-PLUS would certainly not qualify among these. However, the original author can add an exception to the license specifically for S-PLUS, as noted in

http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs

> For this reason I started to use the LGPL for S-PLUS packages that I
> put on statlib. I noticed that when these packages were ported to R,
> the licence was changed to GPL, but that is o.k. and allowed by the
> LGPL. I guess this question will soon become more interesting again
> since there have been e-mails to this mailing list that S-PLUS wants
> to become more compatible to R so that packages developed for R can be
> easily used (ported?) to S-PLUS. I guess the guys in Insightful have
> to be very careful on how they do that... :)

Deepayan

-- 
http://www.stat.wisc.edu/~deepayan/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sun May 21 03:55:26 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 22 May 2006 - 02:10:14 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.