First, IANAL (I am not a lawyer), but I've researched open source licenses for work. So don't quote me in court. And consult a lawyer if you hit any murky parts (see below).
Second, R and R Studio are different things from different groups with different authors. R GUI (I assume you mean Rgui.exe
) is part of R. The same license applies. R Studio uses its own license. If you're using the non-enterprise version of R Studio, then the rest of this post applies to that (unless you let other people use it over a network).
You can read the licenses for R here: https://www.r-project.org/Licenses/. The open source version of R Studio uses the AGPL license: http://www.gnu.org/licenses/agpl-3.0.txt.
For open source licenses:
Individual packages have their own licenses, but one of CRAN's rules is that packages use an open source license. The Open Source Initiative gives a good definition of what an open source license is, as well as a list of the common ones.
For open source licenses, they only things they cover are the source code and built versions of the software (R, any R packages you use, and R Studio). This includes any modified versions of these files. But they only cover how you distribute those files, not how you use them.
If you don't distribute those files, you won't have to care about the license. Using R to collect, organize, and analyze data and share the results doesn't necessarily require you to do anything special or worry about the license.
Example where everything's great
Let's say you do an analysis with R and packages downloaded from CRAN, use knitr
to create a PDF report with the results, and send the PDF to your client. None of that violates an open source license. Even if there are different kinds of licenses among the packages, as long as they're open source, you're good.
Example where you need to abide by licenses
Let's say you create an R package for your client. You send it to them and include an installer for R and the required packages to make sure they can use it. Now you need to abide by the licenses. Everything covered by a "copyleft" license (this is the usual case) must be covered by the same license if you distribute it.
So, in this case, if the clients ask you for the source code of R, you need to make sure they get it. And it has to be covered by the same license as your version (meaning the client is free to use, modify, and distribute it). If you haven't modified R's source code, you could just point them to the official website. CRAN packages should be the same way*.
The murky part
With that last example, what's required if the client asks for the source code of the package you wrote? What if you only sent your package and told them where to download R? This is where my confidence ends, and I'd advise contacting a copyright lawyer. Try to find one familiar with open source and copyleft licenses.
* As far as I know, but there are exceptions to every rule. It wouldn't hurt to check each package's license. You can do this in R:
packageDescription("tidyverse", fields = "License")
# [1] "GPL-3 | file LICENSE"
In this case, tidyverse
is covered under the GPL-3 and other terms specified in the LICENSE
file. The location of that file can also be found in R:
system.file("LICENSE", package = "tidyverse")
# [1] "C:/Users/redacted/Documents/R/win-library/3.5/tidyverse/LICENSE"