R code on mactower before power outage, 20141205