Some more touches on RMD

updated R_code.R to match and did some formatting on RMD