Downloading R and RStudio

Mục lục bài viết

Downloading
R and RStudio

If
you plan to use R, you will need to download R and install it on your
computer. It is also advised that you download and install RStudio.
RStudio will make it easier to use R and manage your R scripts. 

Two
good things about R, are that it is free and it runs on most
computers. 

You
can download R from: https://www.r-project.org/ 

Figure
1 – R Project Main Page


What
is CRAN and why is that a good thing?
When you try to
download R from the R Project website, you will have to pick a CRAN site
to get your download of R. CRAN stands for the “Comprehensive R Archive
Network” (CRAN), which is a collection of sites carrying identical
material, consisting of the R distribution(s), the contributed
extensions, documentation for R, and binaries. 

The
CRAN master site is at WU (Wirtschaftsuniversität Wien) in Austria and
is mirrored daily to many other CRAN sites around the world. Please use
the CRAN site closest to you to reduce network load. 

From
CRAN, you can obtain the latest official release of R, daily snapshots
of R (copies of the current source trees), as gzipped and bzipped tar
files, a wealth of additional contributed code, as well as pre-built
binaries for various operating systems (Linux, Mac OS Classic, OS X, and
MS Windows). CRAN also provides access to documentation on R, existing
mailing lists and the R Bug Tracking system. 



Downloading
R
You can download R from: https://www.r-project.org/. Simply
click on the CRAN link under Download in the list on the left side of
the main R site. You can then pick from the list of worldwide CRAN sites
for your download. There is a CRAN server at Washington University, St.
Louis, MO, USA. That would be a good option. Clicking on the
cran.wustl.edu link will take you to the actual download page. 

Figure
2 – Main CRAN Web PSage

Figure
3 – Washington University Saint Louis CRAN Mirror

The
simplest option is to download the pre-compiled binary distribution for
your operating system. Links for those are at the top of the Downloads
page.

Figure
4 – R Downloads Page

Clicking the link on the
downloads page will take you to the file repository. If you are trying
to download R for OSX, the page will look like this.

Figure
5 – R OSX Downloads Page

You
can either select the most recent version of R [arrow A] or download the
version with the latest date [arrow B]. Select the download and save it
to your Downloads folder. That is it. You are ready to install R on your
computer.

If
you are trying to download R for Windows, the page will look like this.

Figure
6 – R File Download Folders for Windows

You
only need the base install of R. When you click the link for the base
folder the next page will look like this: 

Figure
7 – R Download Files for Windows

Select
the most recent version of R [arrow A]. This will be the version with
the latest date of posting. If you have questions, you can read the
version notes [arrow B]. Select the download and save it to your
Downloads folder. That is it. You are ready to install R on your
computer.

Downloading
RStudio
You can use R as it was installed on your computer
but that involves entering commands from the Terminal prompt and editing
R scripts in a separate text editor. RStudio is an easier option and it
provides a useful set of tools that will make your work easier. 

You
can download RStudio from https://www.rstudio.com/. Click the Download
RStudio button near the top of the page. You will want to download the
Open Source Edition of RStudio Desktop. This is the free version of the
application. Commercial entities must pay for an RStudio license. As a
student, you do not.

Figure
8 – RStudio Main Page

Click
the Download RStudio link at the bottom of the page [red arrow] and then
click the installer for your operating system. Save the RStudio
installer download to the Downloads folder on your computer. Be sure to
select the RStudio Desktop Open Source License version. You are ready to
install RStudio on your computer. 

Figure
9 – RStudio Downloads Page

Figure
10 – RStudio Installers Page