Skip to content

Commit

Permalink
Update run_analysis.R
Browse files Browse the repository at this point in the history
  • Loading branch information
semenoffalex committed Apr 27, 2014
1 parent 895ab6e commit 5f95ada
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion run_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ write.table(dataset, "dataset.txt")

# 5. Creating a 2nd tidy data set with the average of each variable for each activity and each subject.
library(reshape)
ids = c("SubjID", "ActID", "ActName")
melted <- melt(dataset, id.vars = c("subject", "activity"))
avg_dataset <- cast(subject + variable ~ activity, data = melted, fun=mean)
write.table(avg_dataset, "avg_data.txt")

0 comments on commit 5f95ada

Please sign in to comment.