-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPA1_template.html
405 lines (306 loc) · 48.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
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Reproducible Research:</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:</h1>
<h2>Programming Assignment 1:</h2>
<p>In this document i describe the steps i did and show the code i used to analyse the given data.
I used R version 3.2.2., my OS is Windows 10.
As a first task the data has to be imported and processed:</p>
<h3>Loading and pre-processing the data</h3>
<p>To import the data the path has to be set. I have changed the class of the date-variable from factor to date. Additionally i have also changed the interval-variable from integer to factor as it is not really a continous variable, but an ordinal number representing the time.
I haven´t changed it explictly into a timestamp as this is the exploratory phase and i find it very easy to handle it that way.s</p>
<pre><code class="r">#setwd("C:/Coursera/Reprod/")
library(lattice)
tab3l_raw <- read.csv("activity.csv")
tab3l_raw$date <- as.Date(tab3l_raw$date)
tab3l_raw$interval <- as.factor(tab3l_raw$interval)
</code></pre>
<p>After loading and preprocessing we want to answer the following question:</p>
<h3>What is the average daily activity pattern?</h3>
<p>For this question we firstly discard all rows which have a missing value in any column. To do that the complete.cases-function is used. The data is stored in a new variable 'tab3l' as we might need the (almost) raw data afterwards.
At first we show the total number of steps per day.</p>
<pre><code class="r">tab3l <- tab3l_raw[complete.cases(tab3l_raw),]
total_per_day <- tapply(tab3l$steps, tab3l$date,sum,na.rm=T)
total_per_day
</code></pre>
<pre><code>## 2012-10-02 2012-10-03 2012-10-04 2012-10-05 2012-10-06 2012-10-07
## 126 11352 12116 13294 15420 11015
## 2012-10-09 2012-10-10 2012-10-11 2012-10-12 2012-10-13 2012-10-14
## 12811 9900 10304 17382 12426 15098
## 2012-10-15 2012-10-16 2012-10-17 2012-10-18 2012-10-19 2012-10-20
## 10139 15084 13452 10056 11829 10395
## 2012-10-21 2012-10-22 2012-10-23 2012-10-24 2012-10-25 2012-10-26
## 8821 13460 8918 8355 2492 6778
## 2012-10-27 2012-10-28 2012-10-29 2012-10-30 2012-10-31 2012-11-02
## 10119 11458 5018 9819 15414 10600
## 2012-11-03 2012-11-05 2012-11-06 2012-11-07 2012-11-08 2012-11-11
## 10571 10439 8334 12883 3219 12608
## 2012-11-12 2012-11-13 2012-11-15 2012-11-16 2012-11-17 2012-11-18
## 10765 7336 41 5441 14339 15110
## 2012-11-19 2012-11-20 2012-11-21 2012-11-22 2012-11-23 2012-11-24
## 8841 4472 12787 20427 21194 14478
## 2012-11-25 2012-11-26 2012-11-27 2012-11-28 2012-11-29
## 11834 11162 13646 10183 7047
</code></pre>
<p>To give some insights in the total number of steps per day and to see its distrubition, a histogram was made:</p>
<pre><code class="r">hist(total_per_day,10, main="Histogram: Total number of steps per day", xlab = "Number of steps")
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfgAAAH4CAMAAACR9g9NAAAAilBMVEUAAAAAADoAAGYAOjoAOpAAZpAAZrY6AAA6ADo6AGY6OmY6OpA6ZrY6kJA6kNtmAABmADpmAGZmOgBmOpBmZjpmZmZmtrZmtv+QOgCQOjqQOmaQkDqQkGaQtpCQ29uQ2/+2ZgC2Zjq2tma2/7a2///bkDrb/7bb/9vb////tmb/25D//7b//9v////OSeIuAAAACXBIWXMAAAsSAAALEgHS3X78AAAPp0lEQVR4nO2d62Li1hlFZXdqdzqJmWmTwKRNTFNIzUXv/3rVObqAzEUCjrw/8a31I3hg78ORFrrgIJzl4JJMPQHQgHinIN4piHcK4p2CeK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L/0UbL+/7o3Zvrl2zPnDb0X56JA3jVyOm3rGqyB2Pk0/3R2JxK+/vMWXaRLiVzFM6zHbNzdMsVhZR4e8ceQw7hAzPjXPRKs6kfjwRSnJxBc7ubANVWO2b24YtRB0dMgbR44vqPQz3s5eBplujcUtPjKfjmiLTz/jzeQlH2S6NRaP8ZETR7jrB1wPcoxviU837vo5nC2O4BgfdkzJzurDzmz766Ias31zPWFlHR3yxpHrQ0jKGZfeB5lujdX38Q+vqd++Dv0+PuWMl/HimekI3sfD2EC8UxDvFMQ7BfFOQbxTEO8UxDsF8U5BvFMQ7xTEOwXxTkG8UxDvFMQ7BfFOQbxTEO8UxDvlrsWXH1Y9/lnk8mq3o2xn2ctujKQfGrfDnYsPFzReLL5VQPwIWX/+4ymqi1fRfF5sv/87y15WWdig5z/XFyIXL4713/8R/2hy/Ffxn/BR6XyVlf+o/pNvvv0rPrC6i7+wfOfiF8WGvSd+9lTsBZ7iVjz/9BZv4tUJ1QUM4V+r8v7yMpZllY2hzeTT2+pxUd0/du5d/Oafb/tbfLy2MV56Fnb182n4qTBZ7c+D03B1Wim+vD4tjFGGNpNpaKe9RFDGvYvPly/Hxf/nNYoP1zc/VKrLq6y+N/96Dnv2IL4MReNhD/JcHgrGzd2L337/7dQWv53Fyxzz5gyutcUHyv1+FQqt6hsQVukuF1Nx9+LjqX1wtnxsi28O381RvX2MD3JXzYlA8dNm8hRuqvu1S3Y79y8+GA9XIf74rS3+5/oyx3J/HgvVOX75r3lWfm1OfZ6/+fpTrMw5q/fFnZzVVSC+N4iHOwDxTkG8UxDvFMQ7BfFOQbxTEO8UxDsF8U5BvFMQ7xTEOwXxTkG8UxDvlP8DT0IPaQy+JCAAAAAASUVORK5CYII=" alt="plot of chunk chunk"/></p>
<p>#</p>
<p>We see that the frequency for 10k-12k steps is the highest, but there are also a few days, where very few or many steps were reported. To get a better look on the actual numbers we want to calculate the mean and the median of the total number of steps per day:</p>
<pre><code class="r">mean(total_per_day,na.rm=T)
</code></pre>
<pre><code>## [1] 10766.19
</code></pre>
<pre><code class="r">median(total_per_day,na.rm=T)
</code></pre>
<pre><code>## [1] 10765
</code></pre>
<p>Now we want to investigate what the average daily pattern looks like.</p>
<p>###What is the average daily activity pattern?</p>
<p>Therefore we take the mean value for every interval. Afterwards we plot the timeseries. We use the interval as the “time of the day”. Keep in mind 835 means 08:35am. As having a factor as xaxis wasn´t working in a easy fashion, i used a trick: i used an index for the inital plot and added the x-axis by using scales.</p>
<pre><code class="r">average_per_intervall <- tapply(tab3l$steps, tab3l$interval,mean,na.rm=T)
xaxi <- seq(1,length(average_per_intervall),by= 24)
xyplot(average_per_intervall ~ rep(1:length(average_per_intervall),1),layout=c(1,1),ylab ="steps in average", xlab="time of the day", type="l",scales=list(x=list(labels=tab3l$interval[xaxi],at=xaxi)))
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfgAAAH4CAMAAACR9g9NAAAAhFBMVEUAAAAAADoAAGYAOmYAOpAAZrYAgP86AAA6ADo6AGY6OpA6ZrY6kNtmAABmADpmAGZmOgBmOjpmOpBmZgBmZmZmtv+QOgCQOjqQOmaQkGaQkLaQ27aQ2/+2ZgC2Zjq225C2/7a2///bkDrbtmbb25Db/7bb////tmb/25D//7b//9v///+TtrVHAAAACXBIWXMAAAsSAAALEgHS3X78AAARSUlEQVR4nO2dC3ujuBlGyTTRdLaeme62zky3drt22zix/v//KzdzERLoyu19z5MQmw8JRQeBwAJnkkCSLV0AsgwUDwrFg0LxoFA8KBQPCsWDQvGgUDwoFA8KxYNC8aBQPCgUDwrFg0LxoFA8KBQPCsWDQvGgUDwoFA8KxYNC8aBQPCgUDwrFg0LxoCQQP5HleDgoMWbeflD85vP2g+I3n7cfFL/5vP2g+M3n7QfFbz5vP/wzzcjKSSXeOyWZBYoHheJBoXhQKB4UigeF4kGheFAoHhSKB4XiQaF4UCgeFIoHheJBoXhQKB4UigeF4kGheFAoHhSKB4XiQaF4UCDFi6ULsAIoHhSKB4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cU34xZNLX43gJ5i//4eiy3gevf97KnhxRfH9mLmHqMr8QrC2THcv6fT+XvTgAQf3+tevWt+KobX1B13yvx1XLlm3aB/BS/6NVfs/JPzIHtCwMgPiLvf1m6BNGgeAeuMcc3LwzFg0LxoFA8KBQPCsWDQvGgUDwoFA8KxYNC8aD8H8MQ6HivYl9RAAAAAElFTkSuQmCC" alt="plot of chunk plot"/></p>
<p>Additionally we look for the interval with the highest mean. That means the time of the day the average number of steps is the highest.</p>
<pre><code class="r">max_interval <- as.numeric(as.character(tab3l$interval))[which(average_per_intervall==max(average_per_intervall))]
max_interval
</code></pre>
<pre><code>## [1] 835
</code></pre>
<p>That means around 08:35am, in average the highest number of steps is done.
Now we want to analyse what happens if we include substitutes for missing values:</p>
<p>###Imputing missing values</p>
<p>At first we compute the number of rows which have a missing value for at least one variable.</p>
<pre><code class="r">num_of_NA_rows <- sum(!complete.cases(tab3l_raw))
num_of_NA_rows
</code></pre>
<pre><code>## [1] 2304
</code></pre>
<p>That means there are 2304 rows with a missing value.
To include this rows we have to substitute the missing values of steps. As we see in further analysis that the only values which are missing are regarding the variable steps we only have to think about a strategy for this variable.
The strategy to substitute a missing value for steps is the following:
If one value is missing it is replaced by the average number of the reported steps taken on this day. If all values are missing for one day, we replace the values of that day with 0. The new data is stored in tab3l_clean.</p>
<pre><code class="r">tab3l_clean <- tab3l_raw
for (i in seq(1,length(tab3l_clean$steps))){
if(is.na(tab3l_clean$steps[i])){
subset <- tab3l_clean$steps[tab3l_clean$date==tab3l_clean$date[i]]
if(is.nan(mean(subset,na.rm=T))){
tab3l_clean$steps[i]<-0
}else{
tab3l_clean$steps[i]<-mean(subset,na.rm=T)
}
}
}
</code></pre>
<p>For the “cleaned” data we now check if there are different values for the mean and the median. Afterwards we plot the histogram for this data.</p>
<pre><code class="r">total_per_day_clean <- tapply(tab3l_clean$steps, tab3l_clean$date,sum,na.rm=T)
mean_per_days_clean <- mean(total_per_day_clean,na.rm=T)
mean_per_days_clean
</code></pre>
<pre><code>## [1] 9354.23
</code></pre>
<pre><code class="r">median_per_days_clean <- median(total_per_day_clean,na.rm=T)
median_per_days_clean
</code></pre>
<pre><code>## [1] 10395
</code></pre>
<pre><code class="r">hist(total_per_day_clean,10, main="Histogram: Total number of steps per day", xlab = "Number of steps")
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfgAAAH4CAMAAACR9g9NAAAAilBMVEUAAAAAADoAAGYAOjoAOpAAZpAAZrY6AAA6ADo6AGY6OmY6OpA6ZrY6kJA6kNtmAABmADpmAGZmOgBmOpBmZjpmZmZmtrZmtv+QOgCQOjqQOmaQkDqQkGaQtpCQ29uQ2/+2ZgC2Zjq2tma2/7a2///bkDrb/7bb/9vb////tmb/25D//7b//9v////OSeIuAAAACXBIWXMAAAsSAAALEgHS3X78AAAQHUlEQVR4nO2d62Li1hlFZXdqdzqJmWmTwKRNTFNIze39X686RxeEuUiCI+9PfGv9iAfY+3CkhS44CGc7cEmmngBoQLxTEO8UxDsF8U5BvFMQ7xTEOwXxTkG8UxDvFMQ7BfFOQbxTEO8UxDsF8U5BvFMQ7xTEOwXxTkG8UxDvFMQ7BfFOEYrfTB4Xu9129rgo/lUxn1413HaWRZ5OjnT4FOfH6JJaP2cPrwf3XDnlBpvJp7dbx+iFCfEHd8+zVOKbI6UUfzTDa6fcwKf4+K98O8oeF1Ff7m6Z/3jZRZ2P/81Xynb28FO+na3yu/OtbZX9Nb9/kYemTaXr57j2im45UtmoUvnT/RGep3AcVndzrOLRepBpyMfnjcM3xi0sHU952niG8uHdwdOeGjgM8EsQX8w1zmwVl35AzIjfTMLm+ul/xVqclxtvXKl/eQ7iw6N/FqG3VVZxcJwoxJfdwkc57NtefD1yLX4/VvloPkoxyIHm5rjxnlNTftnVY1RP3XjakwMfFZb5C2P+7mCSHKn4prtyay32m+vnuJE+vK6fcz3LLIp/qmqPi1UWCtk0RBojxjHqbr0HLl5XtfiXfHMKA9bi92PFR4vnzUcKkf3zHo/7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DeKYh3CuKdctfiiw+rnv4scnG120m2s+xlP0bSD43b4c7Fhwsae4s/KCB+hKw///EU1cWraD4vtt//nWUvqyxs0POfqwuR8xfH+u//iH80Od7K/xM+Kr1bZcWN8j+7zbd/xQdWd/EXlu9c/CLfsBviZ0/5XuApbsXzT2/xR7w6obyAIdxaFfcXl7Esy2wMbSaf3laPi/L+sXPv4jf/fGtu8fHaxnjpWdjVz6fhX7nJcn8enIar0wrxxfVpYYwitJlMQzvtJYIy7l38bvlyWvx/XqP4cH3zQ6m6uMrqe33rOezZg/giFI2HPchzcSgYN3cvfvv9t3Nb/HYWL3Pc1WdwB1t8oNjvl6HQKr8BYZXucjEVdy8+ntoHZ8vHQ/H14bs+qh8e44PcVX0ikP9rM3kKP8r7tUt2O/cvPhgPVyH++O1Q/M/VZY7F/jwWynP84tY8K742pzrP33z9KVbmnNX74k7O6koQ3xnEwx2AeKcg3imIdwrinYJ4pyDeKYh3CuKdgninIN4piHcK4p2CeKcg3imId8r/AaX30uIjuKlbAAAAAElFTkSuQmCC" alt="plot of chunk chunk6"/></p>
<p>#</p>
<p>We can see that the histogram looks different. Especially we see that there are a quite a lot days now which have very few steps in total. This is probably because we set the value of steps to 0, if all values are missing for one day. Furthermoe the median and the mean values are lower. This can also be explained by the days with total numer of days equal to 0 now.</p>
<p>###Are there differences in activity patterns between weekdays and weekends?</p>
<p>Now we want to see if there are any differences between weekdays and weekends.
Therefore we create a logical vector indicating if we have a weekend-day or not. For reproducibility i use the following expression to get the English names for the weekdays. We can also create a factor for that. Though i don´t really use it.</p>
<pre><code class="r">Sys.setlocale("LC_TIME", "C")
</code></pre>
<pre><code>## [1] "C"
</code></pre>
<pre><code class="r">days <- weekdays(tab3l$date,abbreviate = F)
days_log <- days == "Saturday" | days == "Sunday"
days_fac <- character(length(days_log))
days_fac[days_log] <- "weekend"
days_fac[!days_log] <- "weekday"
days_fac <- as.factor(days_fac)
summary(days_fac)
</code></pre>
<pre><code>## weekday weekend
## 11232 4032
</code></pre>
<p>Now we can run a separate analysis for both categories, we therefore create a big table, in the first rows we have the values (average steps per intervall) for weekend-days and then those of the weekdays. Afterwards we plot them with the lattice-library and in the same way as the other timeseries-plot.</p>
<pre><code class="r">average_per_intervall_WE<- tapply(tab3l$steps[days_log], tab3l$interval[days_log],mean,na.rm=T)
average_per_intervall_WD<- tapply(tab3l$steps[!days_log], tab3l$interval[!days_log],mean,na.rm=T)
average_per_intervall_WE <- cbind(steps=average_per_intervall_WE,wday=rep("weekend",length(average_per_intervall_WE)))
average_per_intervall_WD <- cbind(steps=average_per_intervall_WD,wday=rep("weekday",length(average_per_intervall_WD)))
average_both <- rbind(average_per_intervall_WE,average_per_intervall_WD)
average_both_intervall <- data.frame(cbind(average_both,interval=rep(unique(as.character(tab3l$interval)),2)),row.names = 1:length(average_both[,1]))
average_both_intervall$steps <- as.numeric(as.character(average_both_intervall$steps))
average_both_intervall$interval <- as.character(average_both_intervall$interval)
xaxi <- seq(1,length(average_per_intervall_WE[,1]),by= 24)
xyplot(steps ~ rep(1:length(average_per_intervall_WE[,1]),2)| factor(wday),data=average_both_intervall,layout=c(1,2),xlab="time of the day", type="l",scales=list(x=list(labels=average_both_intervall$interval[xaxi],at=xaxi)))
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfgAAAH4CAMAAACR9g9NAAAA8FBMVEUAAAAAAC4AADoAAFIAAGYAM1IAM3MAOmYAOpAAXJEAZrYAgP86AAA6AC46ADo6AFI6AGY6MwA6M3M6OpA6XJE6ZrY6gHM6gK86kNtmAABmAC5mADpmAFJmAGZmMwBmM3NmOgBmOjpmOpBmXFJmZgBmZmZmgHNmo8xmtv+QMwCQMy6QM1KQOgCQOjqQOmaQXACQgFKQkGaQkLaQxZGQxcyQ27aQ2/+2XAC2XC62ZgC2Zjq2xXO225C25ZG25cy2///bgC7bkDrbtmbb5czb/7bb////o1L/tmb/xXP/25D/5ZH/5a//5cz//7b//9v///+q5XvgAAAACXBIWXMAAAsS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4oUC8UCBeKBAvFIgXynbFf/zsMvnXFnH3Qn/Q4ovLPijbLJsW3ysC4rfF7ePo3r8/u7x7+bco2h3TD1H1U5flysvk4Sev8rj/TT9IrQX8/A/7+OND/fzFXt9NFfKPYWCz4vOWfPfiLNGX3hITX+z0zTGai/QWi6rFP0yXrYBof/v1K71a35CxC/iXsLB58S9fxfp/4lBrzO5l0o/JUu1Qn/yvB+SH+mT29o/v/sl3R0QgJIl/HEXZPS1adPJkQ3wtQB/h9X0x95Iy/vHHrR3pRYkv71z0tfhaQNLibx/v09fA4U+bO9JLEp+f2fU6+xyfibcCon36/C9fpf+3xnbF373IevWV+Kwbr8m675n4LC5dqAKSS3zdqz9E6YTx9vZgbFc8IR9/HboG9EB8NwfGu5yDAfFCgXihQLxQIF4oEC8UiBcKxAsF4oUC8UKBeKH8P1sVd6/QpM7hAAAAAElFTkSuQmCC" alt="plot of chunk chunk8"/></p>
<p>#</p>
<p>That was my analysis. I hope you appreciate it. Thanks for rewiewing!</p>
</body>
</html>