Andrew ID:
Collaborated with:

This lab is to be done in class (completed outside of class if need be). You can collaborate with your classmates, but you must identify their names above, and you must submit your own lab as an knitted HTML file on Canvas, by Thursday 10pm, this week.

Important note: this assignment is to be completed using base R graphics. That means, e.g., no ggplot commands are allowed!

This week’s agenda: getting familiar with basic plotting tools; understanding the way layers work; recalling basic text manipulations; producing histograms and overlaid histograms.

Plot basics

n = 50
x = runif(n, min=-2, max=2)
y = x^3 + rnorm(n)
plot(x, y, type="p")

plot(x, y, type="l")

Adding to plots