Pset 7 R

The rest of pset 7 in R and figures 3 and 4 replication