- The dataset url - "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
- Download and install reshape2 library.
The R script with the name run_analysis.R
, performs the following steps:
- Setting up working Directory
- Downloading the file and storing in data directory.
- creating a .gitignore file and appending the data directory, so data directory wont be pushed in git repository.
- Downloading and unziping action.
- Loading activity labels & features from activity_labels.txt & features.txt.
- Extracting only mean and standard deviation on the required.
- Loading the train dataset.
- Binding the train dataset to train variable.
- Loading the test dataset
- Binding the test dataset to test variable.
- Merging the test and train dataset and creating new variable named - alldata.
- Applying label to the new merged dataset.
- Converting the activities and subject into factors
- Loading the reshape library
- converting and casting the new dataset to molten dataframe and casting the required.
- Writing the dataframe to the txt file, named -
tidy.txt
By running the script you will be able to write the output in tidy.txt