3

I want to make a commercial tutorial website that will teach people to use GPL-licensed R packages in a series of articles.

The website will not execute the code, but will show people the output of the GPL code.

I could teach people to use ggplot2 (a graphing package that is GPL v2) by showing the code and the output from ggplot2

library(ggplot2)

ggplot(mpg, aes(displ, hwy, colour = class)) + 
  geom_point()

Would these code snippets also need to be licensed under GPL given the package is GPL as well?

3

Whether using a library creates a derivative work is not entirely clear. Opinions range across:

  • What no, that's silly!
  • The running software is a derivative work because it includes the GPL-covered software, but your source code isn't.
  • Your source code is a derivative work because it uses GPL-covered APIs (is designed to require that GPL-covered work).

The safest approach is to assume that your snippets might indeed be derivative of the GPL library. Then:

  • If the snippets are short or trivial, they may not be eligible for copyright protection and you don't have to do anything.
  • Otherwise, they should be available under the GPL. This does not necessarily mean that you have to offer them under the GPL; any compatible license such as MIT or CC0 would work as well.

I would satisfy this requirement by either linking to a complete script from which your snippets are taken and clearly offering that script under a GPL-compatible license, or by putting a license dedication for those snippets at the end of the blog post.

Note that the entire R ecosystem depends on GPLv2-covered software, so this analysis is likely not unique to that package in question.

Output of GPLv2 covered software is NOT subject to the GPL (see the GPL FAQ). You can show plots etc. without any restrictions or attribution requirements.

Your Answer

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.