ggplot2
, which is also in the tidyverse package.ggplot2
code for plots will be available in the slides. Just search for ‘ggplot’ggplot2
density()
object out of it, then plot()
that thing!Ecdat
packageinstall.packages('Ecdat')
library(Ecdat)
data(MCAS)
plot(density(MCAS$totsc4))
plot(density(MCAS$totsc4),main='Massachusetts Test Scores',
xlab='Fourth Grade Test Scores')
hist()
hist(MCAS$totsc4)
freq=FALSE
, or change how many bins there are, or where they are, with breaks
hist(MCAS$totsc4,xlab="Fourth Grade Test Scores",
main="Test Score Histogram",freq=FALSE,breaks=50)
boxplot(MCAS$totsc4,main="Box Plot of 4th Grade Scores")
boxplot(select(MCAS,totsc4,totsc8),main="Box Plot of 4th Grade Scores")