Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
eesys-public
BIA-Resources
Commits
5ff3b9e8
Commit
5ff3b9e8
authored
Oct 21, 2019
by
Weigert, Andreas
Browse files
corrected wrong task numeration
parent
89ab01ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Tutorial_Scripts/RIntro/BIA_T02_RIntro2.Rmd
View file @
5ff3b9e8
...
@@ -53,40 +53,40 @@ summary(Shower_clean) # all rows having NA values in one or many columns are now
...
@@ -53,40 +53,40 @@ summary(Shower_clean) # all rows having NA values in one or many columns are now
```{r Simple Statistics}
```{r Simple Statistics}
# Task
5
# Task
7
mean(Shower$ShowerTime) #mean without parameters does not work because we have some NA values in this vector
mean(Shower$ShowerTime) #mean without parameters does not work because we have some NA values in this vector
mean(Shower_clean$ShowerTime) #this data frame is cleaned and mean should work
mean(Shower_clean$ShowerTime) #this data frame is cleaned and mean should work
mean(Shower$ShowerTime, na.rm = T)
mean(Shower$ShowerTime, na.rm = T)
# Task
6
# Task
8
var(Shower_clean$ShowerTime) #variance (implements sample variance)
var(Shower_clean$ShowerTime) #variance (implements sample variance)
# Task
7
# Task
9
median(Shower_clean$ShowerTime)
median(Shower_clean$ShowerTime)
# Task
8
# Task
10
sd(Shower_clean$ShowerTime) #standard deviation (implements sample formula)
sd(Shower_clean$ShowerTime) #standard deviation (implements sample formula)
# Task
9
# Task
11
#compare variance and square of standard deviation
#compare variance and square of standard deviation
(sd(Shower_clean$ShowerTime)^2) == var(Shower_clean$ShowerTime)
(sd(Shower_clean$ShowerTime)^2) == var(Shower_clean$ShowerTime)
#the comparison of numbers should be made considering a precision:
#the comparison of numbers should be made considering a precision:
all.equal((sd(Shower_clean$ShowerTime)^2), var(Shower_clean$ShowerTime))
all.equal((sd(Shower_clean$ShowerTime)^2), var(Shower_clean$ShowerTime))
# Task 1
0
# Task 1
2
max(Shower_clean$ShowerTime)
max(Shower_clean$ShowerTime)
min(Shower_clean$ShowerTime)
min(Shower_clean$ShowerTime)
# Task 1
1
# Task 1
3
quantile(Shower_clean$ShowerTime)
quantile(Shower_clean$ShowerTime)
```
```
```{r Write and filter data}
```{r Write and filter data}
# Task 1
2
# Task 1
4
write.csv2(x = Shower[Shower$Hh_ID == 8899,], file="../../output/problematic_shower_data.csv")
write.csv2(x = Shower[Shower$Hh_ID == 8899,], file="../../output/problematic_shower_data.csv")
# Task 1
3
# Task 1
5
write.csv2(x = Shower[Shower$Hh_ID != 8899,], file="../../output/cleaned_shower_data.csv")
write.csv2(x = Shower[Shower$Hh_ID != 8899,], file="../../output/cleaned_shower_data.csv")
```
```
...
...
Tutorial_Scripts/RIntro/BIA_T02_RIntro2_exercise.Rmd
View file @
5ff3b9e8
...
@@ -26,44 +26,45 @@ This file is part of the lecture Business Intelligence & Analytics (EESYS-BIA-M)
...
@@ -26,44 +26,45 @@ This file is part of the lecture Business Intelligence & Analytics (EESYS-BIA-M)
# Task 4
# Task 4
# the group is not meaningful as numeric! Convert it to a factor
# the group is not meaningful as numeric! Convert it to a factor
# Task 5
# Task 5
#level names of factors can be changed - mind the order of the elements!
#level names of factors can be changed - mind the order of the elements!
# Task 6
# Task 6
```
```
```{r Simple Statistics}
```{r Simple Statistics}
# Task 31
# Task 7
# Task 32
# Task 33
# Task 8
# Task
34
# Task
9
# Task 10
# Task
35
# Task
11
#compare variance and square of standard deviation
#compare variance and square of standard deviation
#the comparison of numbers should be made considering a precision:
#the comparison of numbers should be made considering a precision:
# Task
36
# Task
12
# Task 3
7
# Task
1
3
```
```
```{r Write and filter data}
```{r Write and filter data}
# Task
38
# Task
14
# Task
39
# Task
15
```
```
After cleaning data we have stored the data to the folder "output".
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment