Giter VIP home page Giter VIP logo

getdata-016's Introduction

getdata-016

Getting and Cleaning Data Course Project

The code assumes that the following files are present in the working directory:

  1. activity_labels.txt
  2. features.txt
  3. X_train.txt
  4. X_test.txt
  5. Y_test.txt
  6. Y_train.txt
  7. subject_train.txt
  8. subject_test.tx

The first part of the code extracts the activity labels as well as the features labels and storing the data for the test and training sets.

The labels which are numeric are then convereted into the appropriate activity labels.

Once that is complete the subject files for the test and the training sets are extracted and binded to the appropraite data sets. Once that is complete all of the data is binded together. The appropriate column names are applied.

The next step is to determine all of the columns that contain the word mean() or std(). This is accomplished with the function grepl. Once the columns are determined the data set is subsetted to the appropriate columns and stored into a new data set called clean.

Finally the data is summarized by using the function aggregate with all columns from 3 to 68 categorized by the first two columns which are the activity and subject columns.

Once this is all complete a write.table function is called for the output text file.

getdata-016's People

Contributors

sho-ohata avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.