2

I am creating a new package that I would like to submit to Bioconductor. It's essentially a C code, which is called by R (using Rcpp).

One of the C functions within my package, is the C code of the R optimize function (obtained from a C file of the folder: R-3.6.1\src\library\stats\src\optimize.c), but slightly modified.

At the top of the R-3.6.1\src\library\stats\src\optimize.c file it states that: "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."

I am just not entirely certain if my Bioconductor package is allowed to contain this slightly modified C code of the R function? And if yes, should I place the aforementioned phrase "This program is free software..." in comments above the specific function?

New contributor
Elena is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2

As I understand it, since your software contains code taken directly from R, albeit then modified, your software is, in copyright terms, a derivative work of R.

[Is] my Bioconductor package ... allowed to contain this slightly modified C code of the R function

Yes, it is. The point of the GPL is to allow code reuse in this manner.

should I place the aforementioned phrase "This program is free software..." in comments above the specific function?

You are right to suspect that you now have some obligations, but they are a bit more complex than that. Firstly, you are obliged to distribute your entire program under the GPL, either v2 or v3, so you should read them both and decide which to use; GPLv3 is the more "current" one. You may, at your discretion, extend to your users the "or any later version" option, using language much like the above.

Having decided which version to use, the licence will tell you the exact nature of your obligations, and give you advice on labelling your code. In short, you must make your source code available to all your users, you must do so under the terms of the GPL, and you must distribute a copy of the GPL alongside your software; but this summary is no substitute for reading the licence itself.

You do not say what Bioconductor is, nor do you link to it so it's hard to know, but I suspect it's some kind of central repository for life-science-related code. Whatever it is, it may impose some terms on the redistribution of your program. If it does, and these terms are incompatible with those of the GPL version you have chosen, then you cannot have your program redistributed in this way and will not be able to submit it to Bioconductor.

  • Please don't go and change the license! If the original says "GPLv2 or later", keep that for your derivative. Unless you have a powerful reason for the change. Any user wishing to use the original under GPLv2 will want to stick to it. – vonbrand 6 hours ago

Your Answer

Elena is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.