Add a Directory HW9

Add a directory HW9 to your repository. This is where you will put the rest of your work for this assignment.

Be sure to commit and push your changes.

1. Economic Data

The economics data set in the ggplot2 package contains five US economic indicators recorded over about 40 years. Plot the time series, standardized in an appropriate way, in a single plot and in five separate panels with their own vertical scales. Describe any interesting features you can see in the data. Are there features that are easier to see in a single plot or in the separate plots?

2. Florida Death Penalty Data

The data frame deathpenalty in package catdata contains a summary of death penalty verdicts in Florida over a number of years. What conclusions can you draw from the data? use an appropriate plot to support your argument.

You can load the data with

data(deathpenalty, package = "catdata")

The help file for deathpenalty describes the variables. You can transform the data to a cross tabulation with

xtabs(Freq ~ ., data = deathpenalty)

It may be useful to recode the variables as factors with meaningful labels, e.g.

factor(deathpenalty$VictimRace, labels = c("black", "white"))

Submit Your Work

Write up your work in an Rmarkdown document called hw9.Rmd in your HW9 folder, and commit it to your local repository. You can commit the hw9.html file as well but you do not need to.

Submit your work by pushing your local repository changes to your remote repository.

Make Sure Your Work Is Reproducible

One of the goals of using git, GitHub, and Rmarkdown is for you to practice creating a framework that you can hand to someone else to reproduce your analysis. This means, among other things, that

If you are working on Windows or a Mac a good test is to go to our Linux systems, check out your repository, and check that your hw9.Rmd file can be rendered successfully to produce hw9.html. You can do this using the RStudio menus or from the R command line with


Make sure your working directory is HW9 for this.

You can also run this command in a shell in your HW9 directory:

Rscript -e 'rmarkdown::render("hw9.Rmd")'

Make sure you use the right combination of single and double quotes.