Modify R script to set working directoy on different machines. Needs improvement.