You are on page 1of 2

If you have not installed R and RStudio you need to by following

these instructions. Otherwise skip this step.


Installation of R and RStudio
Use the following article link with directions for installing R and R Studio for your operating system.

Install R and RStudio - A Step-by-Step Guide for Beginners - TechVidvan

You can place a shortcut on your desktop for RStudio. This next link is a video to show how to install R
and RStudio.

How to download and install R and RStudio - YouTube

You must install R and then install R Studio which is the development environment that uses R.

This can take a while depending on the speed of downloads for your Internet connection.

The RStudio icon on your desktop might look like:

You can also launch RStudio from the taskbar if you placed it there.

The following video explains the 4 windows in RStudio:

RStudio for the Total Beginner - YouTube


ASSIGNMENT
You will be customizing graphs in this assignment.

You will need to install 2 packages for most of the recipes in the cookbook to run.

In RStudio, you type and run:

install.packages(“usmap”)

install.packages(“ggplot2”)

Then in RStudio, you type this and run once before each R session:

library(usmap)

library(ggplot2)

Homework Assignment steps:

1) Place your name and the date on the top of the document.

a. In RStudio open the script file called USMAPExamples.R


b. If you have not installed the packages usmap and ggplot2 do so.
c. If you have not issued the library commands for usmap and ggplot2 do so.
d. For each ggplot in the script (6 of them):
i. Run it and see the output in the plot window on the bottom right of the screen
ii. Create a screenshot of the graph and place it into the Word document (in
export under plots it has the features to create a graphic file or copy to the
clipboard for pasting).

2) Submit the Word document with the screenshots.

You might also like