modified R files to all include data manipulation steps