Title | Author |
---|---|
Getting and Cleaning Data |
Adrian Cortinas |
This repository is for John Hopkins' Getting and Cleaning Data Course project assignment files.
For this assignment we have to create an R script that performs the following:
- Merge two or more data sets to create one data set.
- Extract only the measurements on the mean and standard deviation for each measurement.
- Use descriptive activity names to name the activities in the data set
- Appropriately label the data set with descriptive variable names.
- From the data set in step 4, create a second, independent tidy data set with the average of each variable for each activity and each subject.
The script needs dplyr and tidyr libraries installed in order for it to work. You can install them by executing this command:
install.packages("tidyr","dplyr")
You may need to restart R or R Studio after this is done.
File Name | Description |
---|---|
README.md | This file. |
CodeBook.md | Description of all elements used in the R script. |
run_analysis.R | R Script to run and perform the data analysis. |
File Name | Description |
---|---|
projectiles FUCI HAR Dataset.zip | Data Sets |
File Name | Description |
---|---|
RawData.csv | All individual files merged into one single data set. |
TidyData.csv | CSV File with the average of each dimension (variable) for each activity and each subject. |
TidyData.txt | Text File with the average of each dimension (variable) for each activity and each subject. |
run_analysis.R contains all the instructions to download, merge and produce aforementioned files. All you need to do is execute (source) run_analysis.R and it will create the two files, RawData.csv and TidyData.csv.
source("path_to_file/run_analysis.R")