R Code for STAT567 Win2014 HWs