I took the Harvard PH525x course approximately a year ago. The notebook I have doesn't have the sessionInfo() so I'm not sure which version of R this works in. I tried in 3.2.0, 3.0.1 but get an error:
install.packages("dagdata")
Warning in install.packages :
package ‘dagdata’ is not available (for R version 3.2.0)