The data transformation code is located in a script called "run_analysis.R". Before the script is executed, the zip file containing the Human Activity Recognition database should be downloaded from http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones into the working directory of R.
Upon execution, the "run_analysis.R" script unzips the file and performs data transformation on the available datasets. The resulting dataset is recorded in a csv file in the working directory.
The csv file could be exported to a pdf file by using the export function of the software used to open the csv file.