Skip to content

This repository contains the documents asked for in the project from the Coursera Getting and Cleaning Data course

Notifications You must be signed in to change notification settings

camiloramirezgo/Getting-and-Cleaning-Data-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Getting and Cleaning Data Project

This repository contains the documents asked for in the project from the Coursera Getting and Cleaning Data course.

The script presented in the file run_analysis.R does the following:

  1. Checks if the dataset exists in the current directory and downloads it otherwise
  2. Imports the plyr package
  3. Loads the necessary files to perform the analysis into R, using the function unz() to create the connection:
  • activity_labels.txt.
  • features.txt.
  • X_test.txt.
  • y_test.txt.
  • subject_test.txt.
  • X_train.txt.
  • y_train.txt.
  • subject_train.txt.
  1. Merges the data from the training and test files, using the function rbind()
  2. Creates a boolean vector with the column names corresponding to the mean() and std() values, using the function grep to subtract this information from the features vector
  3. Creates a dataframe corresponding to the subset of the specified columns
  4. Updates the corresponding names to the activities in the data
  5. Correct the column names by making them lower case and adding the “subject” and “activity” columns
  6. Merge all data with the function cbind()
  7. Creates a new tidy dataset using the ddply() function and stores it in the variable AveragesData that contains the average of each variable for each activity and each subject
  8. Writes the text file tidy_dataset.txt that contains the resulting tidy dataset

About

This repository contains the documents asked for in the project from the Coursera Getting and Cleaning Data course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages