fixed rm.na to na.rm in line 123 and ran to knit HTML document as well as produce plots in figures directory