R is a free, open source software environment for working with data. It allows you to import datasets, to wrangle and transform your data, to conduct a variety of statistical tests from simple summary statistics to sophisticated modeling, and to visualize your data.
You can download the R package from the The Comprehensive R Archive Network (or CRAN). CRAN is a network of web servers around the world that store identical, up-to-date, versions of code and documentation for R.
RStudio is the most popular Integrated Development Environment (IDE) for R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management.
RStudio is available in freeor commercial (paid) editions and runs on the desktop (Windows, Mac, and Linux) or in a browser connected to RStudio Server or RStudio Workbench (Debian/Ubuntu, Red Hat/CentOS, and SUSE Linux). The free version of RStudio can be downloaded here.
Note: You need to download and install both R and RStudio separately in order to use RStudio.