-
Unzip the source ( https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip )
into a folder on your local drive, say C:\Users\yourname\Documents\R\
-
Put run_analysis.R to C:\Users\yourname\Documents\R\UCI HAR Dataset\
-
in RStudio: setwd("C:\\Users\\yourname\\Documents\\R\\UCI HAR Dataset\\")
and then: source("run_analysis.R")
-
The latter will run the R script, it will read the dataset and write these files:
merged_clean_data.txt -- 8.35 Mb, a 10299x68 data frame
data_set_with_the_averages.txt -- 0.225 Mb, a 180x68 data frame
The script normally runs for ~30 seconds, but the exact number depends on your system.
-
Use data <- read.table("data_set_with_the_averages.txt") to read the latter. It is 180x68 because there are 30 subjects and 6 activities, thus "for each activity and each subject" means 30*6=180 rows. Note that the provided R script has no assumptions on numbers of records, only on locations of files.
-
Notifications
You must be signed in to change notification settings - Fork 23
gralic/Getting-and-Cleaning-Data-Project
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published