Re: [R] How can you buy R?

From: Berwin A Turlach <>
Date: Sat 20 May 2006 - 21:24:48 EST

G'day Spencer,

>>>>> "SG" == Spencer Graves <> 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. 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... :)

    SG> A "boundary" case is provided by the "glmmADMB" package. As I     SG> read the GPL, this package must operate under GPL. According to the DESCRIPTION file (at least the 0.3 version for linux) it does.

    SG> This means that if anyone wants their source code, the authors     SG> of that package are required to give it to them. I agree, but isn't it all there? Or are you talking about the files in the (inst/)admb directory? The authors of that package should probably write somewhere tht the files in that directory are not under the GPL and everything would be fine.

    SG> I just noticed that the version of "glmmADMB" that I
    SG> downloaded 3/14/2006 does NOT contain a "src" subdirectory.
    SG> This surprises me, given the comment on
    SG> "" that "we generally do not
    SG> accept submissions of precompiled binaries".
But from where die you download it? I cannot see it on CRAN. I found it on the web-site of Otter Research and, presumably, they are free to distribute packages that contain precompiled binaries.
    SG> That is, however, not required by the GPL, as I understand it.
    SG> Rather, it seems to say that Otter Research
    SG> (, who distribute more general "AD
    SG> Model Builder" software, could be required to make freely
    SG> available source code for all the binaries they use.  This
    SG> should be fairly easy for them, because their "AD Model
    SG> Builder" produces C++ code, which they could easily include in
    SG> a "src" subdirectory of their package.  The GPL would NOT
    SG> require them to distribute source code for the "AD Model
    SG> Builder" itself, since that has an independent existence.
I definitely agree to the latter. But from a quick look at the R code it seems to me that this packge does not dynamically link any code into R. Rather, it seems that the communication with the precompiled binaries are via calls to "system()" and communications via files written into a temporary directory. So while the C++ code could be made available in the "src" subdirectory, I don't see why the GPL would require them to do so. Those binaries seem to be also stand-alone and independent. You can probably reverse-engineer the R code to see how you could use them without R.

    SG> If anyone has any evidence contradicting the above, I'd like     SG> to know.
I guess the above indicates that I have partly a different interpretation than you have. But, as I said, I am not a lawyer. And as the German proverb goes "Wo kein Klaeger ist, ist auch kein Richter"---which means that you will probably only get definite answers to these licences questions by testing them in court. Good luck if you choose to do so. :-)


        Berwin mailing list PLEASE do read the posting guide! Received on Sun May 21 00:52:20 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 Sun 21 May 2006 - 04:10:12 EST.

Mailing list information is available at Please read the posting guide before posting to the list.