add dplyr, aggregate file code to william.R