The source file "run_analysis.r" includes all the steps in the project. There are 5 tasks that the program should do in order to generate a tidy data set with the average of each variable for each activity and each subject.
First download the files. You should have a folder called "UCI HAR Dataset" in your directory. The place the R script (run_analysis.r) in the path. Then open a R screen and change your director to the folder that has the R script. Simply type source("run_analysis.r"), and the program would generate the tidy_data.txt file in your current directory.