R is freely available for Linux, Mac, and Windows operating systems.
To install R,
RStudio is an "integrated development environment" that many people find useful for using R. It is essentially a graphical user interface layer over R's default command line interface. Also, while there are differences in the way R works across different operating systems, RStudio provides the same experience on all platforms. RStudio is also free and open source.
*NOTE: R should be installed before RStudio.
To install RStudio,
"Packages" are libraries of code that provide R functions, data, and documentation. R comes with "base R", a collection of standard packages. You can view the base R packages after installing R by running the following code in the command line interface.
There are multiple ways to install R packages:
Type the following command, where
<pkg name> is the name of the package to be installed.
From RStudio "Tools" menu
From RStudio "Packages" tab