forked from rdpeng/RepData_PeerAssessment1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPA1_template.html
372 lines (275 loc) · 46.4 KB
/
PA1_template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Reproducible Research: Peer Assessment 1</title>
<script type="text/javascript">
window.onload = function() {
var imgs = document.getElementsByTagName('img'), i, img;
for (i = 0; i < imgs.length; i++) {
img = imgs[i];
// center an image if it is the only element of its parent
if (img.parentElement.childElementCount === 1)
img.parentElement.style.textAlign = 'center';
}
};
</script>
<!-- Styles for R syntax highlighter -->
<style type="text/css">
pre .operator,
pre .paren {
color: rgb(104, 118, 135)
}
pre .literal {
color: #990073
}
pre .number {
color: #099;
}
pre .comment {
color: #998;
font-style: italic
}
pre .keyword {
color: #900;
font-weight: bold
}
pre .identifier {
color: rgb(0, 0, 0);
}
pre .string {
color: #d14;
}
</style>
<!-- R syntax highlighter -->
<script type="text/javascript">
var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/</gm,"<")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.childNodes[r].nodeName=="BR"){p+="\n"}else{p+=h(t.childNodes[r])}}}if(/MSIE [678]/.test(navigator.userAgent)){p=p.replace(/\r/g,"\n")}return p}function a(s){var r=s.className.split(/\s+/);r=r.concat(s.parentNode.className.split(/\s+/));for(var q=0;q<r.length;q++){var p=r[q].replace(/^language-/,"");if(e[p]){return p}}}function c(q){var p=[];(function(s,t){for(var r=0;r<s.childNodes.length;r++){if(s.childNodes[r].nodeType==3){t+=s.childNodes[r].nodeValue.length}else{if(s.childNodes[r].nodeName=="BR"){t+=1}else{if(s.childNodes[r].nodeType==1){p.push({event:"start",offset:t,node:s.childNodes[r]});t=arguments.callee(s.childNodes[r],t);p.push({event:"stop",offset:t,node:s.childNodes[r]})}}}}return t})(q,0);return p}function k(y,w,x){var q=0;var z="";var s=[];function u(){if(y.length&&w.length){if(y[0].offset!=w[0].offset){return(y[0].offset<w[0].offset)?y:w}else{return w[0].event=="start"?y:w}}else{return y.length?y:w}}function t(D){var A="<"+D.nodeName.toLowerCase();for(var B=0;B<D.attributes.length;B++){var C=D.attributes[B];A+=" "+C.nodeName.toLowerCase();if(C.value!==undefined&&C.value!==false&&C.value!==null){A+='="'+m(C.value)+'"'}}return A+">"}while(y.length||w.length){var v=u().splice(0,1)[0];z+=m(x.substr(q,v.offset-q));q=v.offset;if(v.event=="start"){z+=t(v.node);s.push(v.node)}else{if(v.event=="stop"){var p,r=s.length;do{r--;p=s[r];z+=("</"+p.nodeName.toLowerCase()+">")}while(p!=v.node);s.splice(r,1);while(r<s.length){z+=t(s[r]);r++}}}}return z+m(x.substr(q))}function j(){function q(x,y,v){if(x.compiled){return}var u;var s=[];if(x.k){x.lR=f(y,x.l||hljs.IR,true);for(var w in x.k){if(!x.k.hasOwnProperty(w)){continue}if(x.k[w] instanceof Object){u=x.k[w]}else{u=x.k;w="keyword"}for(var r in u){if(!u.hasOwnProperty(r)){continue}x.k[r]=[w,u[r]];s.push(r)}}}if(!v){if(x.bWK){x.b="\\b("+s.join("|")+")\\s"}x.bR=f(y,x.b?x.b:"\\B|\\b");if(!x.e&&!x.eW){x.e="\\B|\\b"}if(x.e){x.eR=f(y,x.e)}}if(x.i){x.iR=f(y,x.i)}if(x.r===undefined){x.r=1}if(!x.c){x.c=[]}x.compiled=true;for(var t=0;t<x.c.length;t++){if(x.c[t]=="self"){x.c[t]=x}q(x.c[t],y,false)}if(x.starts){q(x.starts,y,false)}}for(var p in e){if(!e.hasOwnProperty(p)){continue}q(e[p].dM,e[p],true)}}function d(B,C){if(!j.called){j();j.called=true}function q(r,M){for(var L=0;L<M.c.length;L++){if((M.c[L].bR.exec(r)||[null])[0]==r){return M.c[L]}}}function v(L,r){if(D[L].e&&D[L].eR.test(r)){return 1}if(D[L].eW){var M=v(L-1,r);return M?M+1:0}return 0}function w(r,L){return L.i&&L.iR.test(r)}function K(N,O){var M=[];for(var L=0;L<N.c.length;L++){M.push(N.c[L].b)}var r=D.length-1;do{if(D[r].e){M.push(D[r].e)}r--}while(D[r+1].eW);if(N.i){M.push(N.i)}return f(O,M.join("|"),true)}function p(M,L){var N=D[D.length-1];if(!N.t){N.t=K(N,E)}N.t.lastIndex=L;var r=N.t.exec(M);return r?[M.substr(L,r.index-L),r[0],false]:[M.substr(L),"",true]}function z(N,r){var L=E.cI?r[0].toLowerCase():r[0];var M=N.k[L];if(M&&M instanceof Array){return M}return false}function F(L,P){L=m(L);if(!P.k){return L}var r="";var O=0;P.lR.lastIndex=0;var M=P.lR.exec(L);while(M){r+=L.substr(O,M.index-O);var N=z(P,M);if(N){x+=N[1];r+='<span class="'+N[0]+'">'+M[0]+"</span>"}else{r+=M[0]}O=P.lR.lastIndex;M=P.lR.exec(L)}return r+L.substr(O,L.length-O)}function J(L,M){if(M.sL&&e[M.sL]){var r=d(M.sL,L);x+=r.keyword_count;return r.value}else{return F(L,M)}}function I(M,r){var L=M.cN?'<span class="'+M.cN+'">':"";if(M.rB){y+=L;M.buffer=""}else{if(M.eB){y+=m(r)+L;M.buffer=""}else{y+=L;M.buffer=r}}D.push(M);A+=M.r}function G(N,M,Q){var R=D[D.length-1];if(Q){y+=J(R.buffer+N,R);return false}var P=q(M,R);if(P){y+=J(R.buffer+N,R);I(P,M);return P.rB}var L=v(D.length-1,M);if(L){var O=R.cN?"</span>":"";if(R.rE){y+=J(R.buffer+N,R)+O}else{if(R.eE){y+=J(R.buffer+N,R)+O+m(M)}else{y+=J(R.buffer+N+M,R)+O}}while(L>1){O=D[D.length-2].cN?"</span>":"";y+=O;L--;D.length--}var r=D[D.length-1];D.length--;D[D.length-1].buffer="";if(r.starts){I(r.starts,"")}return R.rE}if(w(M,R)){throw"Illegal"}}var E=e[B];var D=[E.dM];var A=0;var x=0;var y="";try{var s,u=0;E.dM.buffer="";do{s=p(C,u);var t=G(s[0],s[1],s[2]);u+=s[0].length;if(!t){u+=s[1].length}}while(!s[2]);if(D.length>1){throw"Illegal"}return{r:A,keyword_count:x,value:y}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:m(C)}}else{throw H}}}function g(t){var p={keyword_count:0,r:0,value:m(t)};var r=p;for(var q in e){if(!e.hasOwnProperty(q)){continue}var s=d(q,t);s.language=q;if(s.keyword_count+s.r>r.keyword_count+r.r){r=s}if(s.keyword_count+s.r>p.keyword_count+p.r){r=p;p=s}}if(r.language){p.second_best=r}return p}function i(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,function(t,w,v,u){return w.replace(/\t/g,q)})}if(p){r=r.replace(/\n/g,"<br>")}return r}function n(t,w,r){var x=h(t,r);var v=a(t);var y,s;if(v){y=d(v,x)}else{return}var q=c(t);if(q.length){s=document.createElement("pre");s.innerHTML=y.value;y.value=k(q,c(s),x)}y.value=i(y.value,w,r);var u=t.className;if(!u.match("(\\s|^)(language-)?"+v+"(\\s|$)")){u=u?(u+" "+v):v}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){s=t.parentNode;var p=document.createElement("div");p.innerHTML="<pre><code>"+y.value+"</code></pre>";t=p.firstChild.firstChild;p.firstChild.cN=s.cN;s.parentNode.replaceChild(p.firstChild,s)}else{t.innerHTML=y.value}t.className=u;t.result={language:v,kw:y.keyword_count,re:y.r};if(y.second_best){t.second_best={language:y.second_best.language,kw:y.second_best.keyword_count,re:y.second_best.r}}}function o(){if(o.called){return}o.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p<r.length;p++){var q=b(r[p]);if(q){n(q,hljs.tabReplace)}}}function l(){if(window.addEventListener){window.addEventListener("DOMContentLoaded",o,false);window.addEventListener("load",o,false)}else{if(window.attachEvent){window.attachEvent("onload",o)}else{window.onload=o}}}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=n;this.initHighlighting=o;this.initHighlightingOnLoad=l;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="\\b(0[xX][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.ER="(?![\\s\\S])";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(r,s){var p={};for(var q in r){p[q]=r[q]}if(s){for(var q in s){p[q]=s[q]}}return p}}();hljs.LANGUAGES.cpp=function(){var a={keyword:{"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"export":1,virtual:1,operator:2,sizeof:2,dynamic_cast:2,typedef:2,const_cast:2,"const":1,struct:1,"for":1,static_cast:2,union:1,namespace:1,unsigned:1,"long":1,"throw":1,"volatile":2,"static":1,"protected":1,bool:1,template:1,mutable:1,"if":1,"public":1,friend:2,"do":1,"return":1,"goto":1,auto:1,"void":2,"enum":1,"else":1,"break":1,"new":1,extern:1,using:1,"true":1,"class":1,asm:1,"case":1,typeid:1,"short":1,reinterpret_cast:2,"default":1,"double":1,register:1,explicit:1,signed:1,typename:1,"try":1,"this":1,"switch":1,"continue":1,wchar_t:1,inline:1,"delete":1,alignof:1,char16_t:1,char32_t:1,constexpr:1,decltype:1,noexcept:1,nullptr:1,static_assert:1,thread_local:1,restrict:1,_Bool:1,complex:1},built_in:{std:1,string:1,cin:1,cout:1,cerr:1,clog:1,stringstream:1,istringstream:1,ostringstream:1,auto_ptr:1,deque:1,list:1,queue:1,stack:1,vector:1,map:1,set:1,bitset:1,multiset:1,multimap:1,unordered_set:1,unordered_map:1,unordered_multiset:1,unordered_multimap:1,array:1,shared_ptr:1}};return{dM:{k:a,i:"</",c:[hljs.CLCM,hljs.CBLCLM,hljs.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},hljs.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:a,r:10,c:["self"]}]}}}();hljs.LANGUAGES.r={dM:{c:[hljs.HCM,{cN:"number",b:"\\b0[xX][0-9a-fA-F]+[Li]?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+(?:[eE][+\\-]?\\d*)?L\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+\\.(?!\\d)(?:i\\b)?",e:hljs.IMMEDIATE_RE,r:1},{cN:"number",b:"\\b\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"keyword",b:"(?:tryCatch|library|setGeneric|setGroupGeneric)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\.",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\d+(?![\\w.])",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\b(?:function)",e:hljs.IMMEDIATE_RE,r:2},{cN:"keyword",b:"(?:if|in|break|next|repeat|else|for|return|switch|while|try|stop|warning|require|attach|detach|source|setMethod|setClass)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"literal",b:"(?:NA|NA_integer_|NA_real_|NA_character_|NA_complex_)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"literal",b:"(?:NULL|TRUE|FALSE|T|F|Inf|NaN)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"identifier",b:"[a-zA-Z.][a-zA-Z0-9._]*\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"<\\-(?!\\s*\\d)",e:hljs.IMMEDIATE_RE,r:2},{cN:"operator",b:"\\->|<\\-",e:hljs.IMMEDIATE_RE,r:1},{cN:"operator",b:"%%|~",e:hljs.IMMEDIATE_RE},{cN:"operator",b:">=|<=|==|!=|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||\\$|:",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"%",e:"%",i:"\\n",r:1},{cN:"identifier",b:"`",e:"`",r:0},{cN:"string",b:'"',e:'"',c:[hljs.BE],r:0},{cN:"string",b:"'",e:"'",c:[hljs.BE],r:0},{cN:"paren",b:"[[({\\])}]",e:hljs.IMMEDIATE_RE,r:0}]}};
hljs.initHighlightingOnLoad();
</script>
<style type="text/css">
body, td {
font-family: sans-serif;
background-color: white;
font-size: 13px;
}
body {
max-width: 800px;
margin: auto;
padding: 1em;
line-height: 20px;
}
tt, code, pre {
font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
}
h1 {
font-size:2.2em;
}
h2 {
font-size:1.8em;
}
h3 {
font-size:1.4em;
}
h4 {
font-size:1.0em;
}
h5 {
font-size:0.9em;
}
h6 {
font-size:0.8em;
}
a:visited {
color: rgb(50%, 0%, 50%);
}
pre, img {
max-width: 100%;
}
pre {
overflow-x: auto;
}
pre code {
display: block; padding: 0.5em;
}
code {
font-size: 92%;
border: 1px solid #ccc;
}
code[class] {
background-color: #F8F8F8;
}
table, td, th {
border: none;
}
blockquote {
color:#666666;
margin:0;
padding-left: 1em;
border-left: 0.5em #EEE solid;
}
hr {
height: 0px;
border-bottom: none;
border-top-width: thin;
border-top-style: dotted;
border-top-color: #999999;
}
@media print {
* {
background: transparent !important;
color: black !important;
filter:none !important;
-ms-filter: none !important;
}
body {
font-size:12pt;
max-width:100%;
}
a, a:visited {
text-decoration: underline;
}
hr {
visibility: hidden;
page-break-before: always;
}
pre, blockquote {
padding-right: 1em;
page-break-inside: avoid;
}
tr, img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
@page :left {
margin: 15mm 20mm 15mm 10mm;
}
@page :right {
margin: 15mm 10mm 15mm 20mm;
}
p, h2, h3 {
orphans: 3; widows: 3;
}
h2, h3 {
page-break-after: avoid;
}
}
</style>
</head>
<body>
<h1>Reproducible Research: Peer Assessment 1</h1>
<h2>Loading and preprocessing the data</h2>
<p>The data for this report can be found at <a href="https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2Factivity.zip">https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2Factivity.zip</a>. </p>
<p>After downloading the data set into a csv file named, “activity.csv”, it is read into R to analyze the numbers.</p>
<pre><code class="r">dat <- read.csv("activity.csv")
</code></pre>
<h2>What is mean total number of steps taken per day?</h2>
<p>Here is a histogram showing the frequencies of the individual's number of steps per day. Entries of “NA” are ignored. </p>
<pre><code class="r">cleanData <- na.omit(dat)
days <- unique(cleanData$date)
daily <- c()
for (i in 1:length(days)) {
daily <- append(daily,sum(subset(cleanData, cleanData$date == days[i])$steps))
}
hist(daily, main="Steps Taken Each Day", xlab="Steps")
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfgAAAH4CAMAAACR9g9NAAAAeFBMVEX9/v0AAAAAADkAAGUAOTkAOY8AZrU5AAA5ADk5AGU5OQA5OY85ZrU5j9plAABlADllAGVlZjlltf2POQCPOTmPOWWPjzmPtY+P27WP29qP2/21ZgC1tWW124+1/tq1/v3ajzna/rXa/v39tWX924/9/rX9/tr9/v2TvrWDAAAAKHRSTl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anc8W33J/c5Zb/Fjrtp5fb0dbs1Z29JqdzzG+5Y0jYKFlNd4x/ln4j8pWV+lMbKQ162RHr9loZ/XXHz2rT/unzbfvven5TSHpH531HKMbjhsfX7c+1Thr1suOXrPzeh5/cTfCE+8TPY//+Lot2utdbsZZs0F27Jr5yl1QDB8UwwfF8EExfFAMHxTDB8XwQTF8UAwfFMMHxfBBMXxQDB8UwwfF8EExfFAMHxTDB8XwQYkcPl2F8mmct4XXR+Dw63m62PTzg+GD0b0J++t/5s1mv5631xr/+u/2vcrLAHMoBw6/ue3ee54eAPftFQjr+eeH5af2QpSPXvN99gQO327ZzQaerjn6epeubEo7/83vd2NcBHj2hA6/ba/RTeHTxcYXXfH7m/RhExdTbx84fPvRAulK0+4qw233KRP9Jw0sP3pB2LkTOHx7Vp8uKu6O8U3q9fwy3aTohp8waQff7NI3t+1ZffPV+utv7T7+3rP6WIQ4q+sx/A6Gl8lj+KAYPiiGD4rhg2L4oBg+KIYPiuGDYvigGD4ohg+K4YNi+KAYPiiGD8r/ASiR2Y0C1yOwAAAAAElFTkSuQmCC" alt="plot of chunk unnamed-chunk-2"/> </p>
<p>The <strong>mean</strong> and <strong>median</strong> total number of steps taken per day can be calculated by looking at the daily totals tallied in the <em>daily</em> variable above. Again, entries of “NA” are ignored.</p>
<pre><code class="r">stepsMean <- mean(daily)
stepsMedian <- median(daily)
stepsMean
</code></pre>
<pre><code>## [1] 10766
</code></pre>
<pre><code class="r">stepsMedian
</code></pre>
<pre><code>## [1] 10765
</code></pre>
<p>On days when data was collected, the individual in this case took an average of 10,766 steps per day with a median value of 10,765 steps.</p>
<h2>What is the average daily activity pattern?</h2>
<p>The following plot displays the individual's average number of steps by 5-minute interval over the entire two months. Entries of “NA” are once again omitted. </p>
<pre><code class="r">fiveMins <- split(cleanData, cleanData$interval)
val <- c()
mx <- c()
for (i in 1:length(unique(cleanData$interval))) {
val <- append(val,sum(fiveMins[[i]]["steps"])/(length(days)))
if (max(val) == sum(fiveMins[[i]]["steps"])/(length(days))) {
mx <- unique(cleanData$interval)[i]
}
}
plot(unique(cleanData$interval), val, type="l", xlab="Interval", ylab="Average Steps", main="Average Steps by Interval")
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfgAAAH4CAMAAACR9g9NAAAAkFBMVEX9/v0AAAAAADkAAGUAOTkAOWUAOY8AZrU5AAA5ADk5AGU5OQA5OWU5OY85ZrU5j9plAABlADllAGVlOQBlZjllZmVltf2POQCPOTmPOWWPZgCPj2WPtY+P29qP2/21ZgC1tWW124+1/rW1/tq1/v3ajznatWXa24/a/rXa/tra/v39tWX924/9/rX9/tr9/v1nC5TLAAAAMHRSTlP//////////////////////////////////////////////////////////////wBipdB4AAAACXBIWXMAAAsSAAALEgHS3X78AAASvklEQVR4nO2dC5ujthWGI286M912Yu+mtTdtYqep3W7HF/7/vysSF3MRICEJBN/3Prtjm8vRGb2AJAbwDwmB5Ie5EyDzQPGgUDwoFA8KxYNC8aBQPCgUDwrFg0LxoFA8KBQPCsWDQvGgUDwoFA8KxYNC8aBQPCgUDwrFg0LxoFA8KBQPCsWDsjzxj4N4dVj9vhPi5SN9c9oPFvTp3F67Nm0wRmuNaFie+NubcKhK6V3ILeck3MUPx6B4f1zE32V9n9R+r35eUpV7KWrzN7E5XtNPm6M6Mnz6Yyd37ny+4vb28pG6+Pch01+u+ul3obandLMqtqts4suH2gCuYiunSY3Fwo9mDFn8X8q08jwo3hNptf/rLa3cqzxg33dp1Z7kPpx6USJevqtdWupKX35MNZfzFanYvYqipNVWlWvd87WTYhn54ZKucpLbUiFeTX/VxXj5T5FWEYniPXF7e1W7YLqDHZV9uQ+rw/Kz8ZeVfXtLF7pU56tZSo98Lw/T1VW3shXYqyk5+cTNsSgyKcVvs+2uGeM1eaZVLE3xnpC7n/yf/tiqmr+qPS49qqo6T7Jm/NP5KjXc00N9OT8PcMrMN1aVdtKIaj99HuqzDeRxSI8j2TaViVdH8Fx8s/girSIPivdDcZxVUr/vVO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kGheFAoHhSKBwVU/PPK5e5rmINe3Tw7FE/xSKRSb+//EGJ/34lPZ/Ujuf31Z3lF8+PbMbtvmeJXiBT/pu5Xk3pP6uaF29te3gN7e/8u71tOF6D49ZF7zV7kPWr3r2rCZSv/JUnxeb1Q/OezuuV5c8xurvyfvPH9JJ92QfErpC7+6zmfljbwv75/3Hd7HupXSk28bOPz1j65iG1x/zvFr5Cn+MdB9eo3x6wXLx94IG9j/NPPe4onK4TiQaF4UCgeFIoHheJBoXhQKB4UigeF4kGheFAoHhSKB4XiQaF4UCgeFIoHheJB+T/i0NsAZK91lgAAAABJRU5ErkJggg==" alt="plot of chunk unnamed-chunk-4"/> </p>
<p>The interval with the highest average number of steps taken can be found using the <em>mx</em> variable above and is displayed below, as well as its value, which is found via the <em>var</em> variable above:</p>
<pre><code class="r">mx
</code></pre>
<pre><code>## [1] 835
</code></pre>
<pre><code class="r">max(val)
</code></pre>
<pre><code>## [1] 206.2
</code></pre>
<h2>Imputing missing values</h2>
<p>This data set has several missing values, denoted by “NA.” The number of such instances can be found easily by subtracting the <em>cleanData</em> data set above from the full data set (<em>dat</em> in the code above). </p>
<pre><code class="r">nrow(dat) - nrow(cleanData)
</code></pre>
<pre><code>## [1] 2304
</code></pre>
<p>So, there are 2,304 intervals in which the individual does not have data on the number of steps taken. </p>
<p>To get a complete set of data, “NA” entries will be replaced with the average steps taken value across the entire <em>cleanData</em> data set. This will be done in a new data set, named <em>complete</em>. A histogram of steps taken each day with this new data set, as well as its <strong>mean</strong> and <strong>median</strong> are all displayed below. </p>
<pre><code class="r">complete <- dat
for (i in 1:nrow(complete)) {
if (is.na(complete$steps[i])) {
complete$steps[i] = mean(cleanData$steps)
}
}
allDays <- unique(complete$date)
fullDaily <- c()
for (i in 1:length(allDays)) {
fullDaily <- append(fullDaily,sum(subset(complete, complete$date == allDays[i])$steps))
}
hist(fullDaily, main="Imputed: Steps Taken Each Day", xlab="Steps")
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgo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+KIYPiuGDYvigGD4o/wc+1ux5FafkvQAAAABJRU5ErkJggg==" alt="plot of chunk unnamed-chunk-7"/> </p>
<pre><code class="r">stepsCompleteMean <- mean(fullDaily)
stepsCompleteMedian <- median(fullDaily)
stepsCompleteMean
</code></pre>
<pre><code>## [1] 10766
</code></pre>
<pre><code class="r">stepsCompleteMedian
</code></pre>
<pre><code>## [1] 10766
</code></pre>
<p>The <strong>mean</strong> and <strong>median</strong> are virtually the same as they were for the data set that omitted “NA” values. This is because the “NA” values were replaced by the <em>cleanData</em> data set's average value, which of course would not alter the overall average. The one noticeable change occurs in the histogram, where the most frequent range of daily steps taken increased in frequency. This is due to the days with “NA” values being assigned the mean, pushing that range higher. </p>
<h2>Are there differences in activity patterns between weekdays and weekends?</h2>
<pre><code class="r">dayType <- c()
for (i in 1:nrow(complete)) {
if (weekdays(as.Date(complete[i,"date"])) =="Saturday" | weekdays(as.Date(complete[i,"date"])) == "Sunday") {
dayType <- append(dayType, "weekend")
}
else {
dayType <- append(dayType, "weekday")
}
}
completeWeekType <- cbind(complete,dayType)
par(mfrow=c(2,1))
weekday <- subset(completeWeekType, completeWeekType$dayType == "weekday")
weekend <- subset(completeWeekType, completeWeekType$dayType == "weekend")
weekdayInt <- split(weekday, weekday$interval)
u <- c()
for (i in 1:length(unique(weekday$interval))) {
u <- append(u,sum(weekdayInt[[i]]["steps"])/(length(allDays)))
}
plot(unique(weekday$interval), u, type="l", xlab="Interval", ylab="Average Steps", main="Weekday Average Steps by Interval")
weekendInt <- split(weekend, weekend$interval)
v <- c()
for (i in 1:length(unique(weekend$interval))) {
v <- append(v,sum(weekendInt[[i]]["steps"])/(length(allDays)))
}
plot(unique(weekend$interval), v, type="l", xlab="Interval", ylab="Average Steps", main="Weekend Average Steps by Interval")
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfgAAAH4CAMAAACR9g9NAAAAn1BMVEX9/v0AAAAAADkAAGUAOTkAOWUAOY8AZrU5AAA5ADk5AGU5OQA5OTk5OWU5OY85ZrU5j485j9plAABlADllAGVlOQBlZjllZmVlj49ltbVltf2POQCPOTmPOWWPZgCPj2WPtY+P27WP29qP2/21ZgC1tWW124+1/rW1/tq1/v3ajznatWXa24/a/rXa/tra/v39tWX924/9/rX9/tr9/v23WahGAAAANXRSTlP/////////////////////////////////////////////////////////////////////AHy10AoAAAAJcEhZcwAACxIAAAsSAdLdfvwAABw9SURBVHic7Z0Ng+OmEYaLL93dXtpt7Vya1ntpr7GTdN1c1vbq//+2avgSSCAhgSTQzJvLri2JYZZHwCAD/kNFQqk/rO0AaR0ReKQi8EhF4JGKwCMVgUcqAo9UBB6pCDxSEXikIvBIReCRisAjFYFHKgKPVAQeqQg8UhF4pCLwSEXgkYrAIxWBRyoCj1QEHqkIPFLlBf79ZXeqqjN7eKvuh/pHW/fDh1fjjeMKYYU9RjhxPzDGLZ+Pg+4a7rhcDLDRSbGQ8gJfMz9Cwdf4ry54YeBvTyyiKIE7g8zBl34Ngx+2QeC5rmxfc/vH07G61K/qH0yUnHwBZVTX5yNUavZPAH+tT+xOnACkrcTFP8DFZ37r8J8yed2g/L2+WqThLcOHX/ndo/Op4LZ5eKvz+e+LwK+TfviZ8fupvq3UfSUOPryZ2QsXxcXvbRuQ/bfaLekHga9EqV93/znsq3NdJGeoe1Ce6gWU0UVyZ1Dkono+vMFBSAGqi/2Xp0e4iXiPYdjhyR6+yjT83Td1hk0+wgV+D0hoVlIzx0pd08pe3pu81XDZePifcktZIvCVaDzPD7+/PMILuAsq60VdRr887QFOXVYXWfxQcLenR93uqtc8YAD6OnnT+Ys00og+L11gokpDM20mhfuOHfkR7S0/uDsZ2Uvwe3HftW08Vo1b6moCDzrvfnp5rC51EyyaQt4a6hd1IX8L9ZEHAKKPh3oDZVpXZAkVqh/8z3sLKHmdXMSOKo02os8rHwT5VlKgU1vk9bRp6sUNYmQvwPMWXIJvZ6/cUn4QeNCFQQd/3X152jvBi1LXzKDD5UcuPAVItbP8gq8Hfr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