You can run the code by typing:
source ('run_analysis.r')
would download the UCI HAR dataset and tidy the data up. The result, which contains the average of each selected measurement for each subject and each activity, would be generated at "tidy.csv".