- First i set my working directory.
- Then _I load the files i need to create the datafiles in R
- Activities
- Features
- X and y files for train and test data.
- Rename columns in X files with the features table.
- Add the activity and subject_id columns to the X files.
- Add the activity name using merge command with the activities table
- Using rbind i join data for train and test in a single data frame.
- Using grep i filter the measured features we want to summarize (mean and std)
- With this new filtered data frame i am ready to summarize
- Using melt we create the intermediate table to summarize data by activity and subject.
- using dcast we create the summarized data frame.
- using write.table we created the text file with the final result.
rcossich / gettingandcleaningdata_finalproject Goto Github PK
View Code? Open in Web Editor NEWFiles required for the final project of the coursers course Getting and Cleaning Data