Description of run_analysis.R:
- set up R work directory(C:/Users/yourname/Documents/coursera/clean_data)
- In same directory save run_analysis.R and subdirectory "data"
- download and unzip the data(https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip) to local
- output in "data" directory:
- merged_clean_data.txt: 10299*68 dimension.
- data_with_means.txt: 180*68 dimension.
- Use data <- read.table("data_with_means.txt") command in RStudio to read the file. There are 6 activities and 30 subjects in total, 180 rows and 68 columns( 66 features), 180*68 dimension.