Installation of R

To install R I will be using the Berkeley Mirror which contains the R installation packages. Click here, then select your operating system:

Windows

If you are using a Windows machine you will select the base option in the next screen:

Then you need to download the windows executable installer.

Once the download is complete run the executable using the default settings. Additional information on installation and FAQ’s can be found here.

Mac OS X

After selecting the (Mac) OS X option you will need to download a package installer based on the version of OS X you are currently running.

Once you have downloaded the appropriate .pkg file, open the file and follow the installation instructions.

Linux

After selecting the Linux option select your flavor of Linux.

From this point forward follow the installation instructions provided on the page for the selected distribution.

RStudio

RStudio is a great IDE which allows you to write and run scripts, view visualizations, and explore data all in one place. Click here to download RStudio. Select the installer package for your OS and download it.

NOTE: You do not need to link R and RStudio, this will happen during the installation if the default settings for installation of R and RStudio are used.

Installing Packages

R comes with a base set of packages, but we will be using a few addditional packages for to aid in creating maps. A package is essentially a set of software tools built to accomplish specific tasks, in this case the packages will aid us in mapping. To install the packages, first open RStudio. You will see a screen similar to the one below.

In the lower left you will see the terminal where you can type commands. Try it out by copying and pasting the following:

2+2

Then hit enter. The terminal will return the value 4. Now that we know R is up and running, copy and paste the following into the terminal: