Those plots did look promising, didn’t they? Let’s start from the beginning and go through basic plots in R. The following section is based on the wonderful R in Action book (pp 119) by Robert Kabacoff. You have the book in your course references. http://www.statmethods.net/ is the book’s quick reference.

To make it a bit more interesting, we return to the LinkedIn and Facebook view numbers. We would like to investigate their relationship. They should be loaded already. Try linkedin to get the LinkedIn views of your week.

linkedin
## [1] 16  9 13  5  2 17 14

Let’s look at the Facebook views again. Type facebook.

facebook
## [1] 17  7  5 16  8 13 14

With the function plot, we simply plot a vector value at a certain index. Try plot(linkedin).

plot(linkedin)

That’s ok but not very pretty. Let’s produce a line plot by using the argument type in plot. With plot(linkedin, type=‘o’, col=‘blue’) you create a blue line plot. Find out how by researching it online.

plot(linkedin, type='o', col='blue')