added run_analysis.R

R script containing run_analysis() function