Commit 3498b9b5 authored by Weigert, Andreas's avatar Weigert, Andreas
Browse files

solution part 1/2 from Tutorial 2 added

parent ee61bb16
title: 'Tutorial 2: R Introduction 2'
output: html_notebook
chunk_output_type: inline
This file is part of the lecture Business Intelligence & Analytics (EESYS-BIA-M), Information Systems and Energy Efficient Systems, University of Bamberg.
```{r Load and inspect data}
# Task 1 clone git repository
# Task 2
# Read data. Remember the relative path
Shower <- read.csv2("../data/Shower_data.csv")
?read.csv #help pages for format options of the data file
# Task 3
# Inspect the dataset
head(Shower, n=30)
tail(Shower, n=20)
```{r Convert and take care about missing data}
# Task 4
# the group is not meaningful as numeric! Convert it to a factor
Shower$group <- as.factor(Shower$group)
# Task 5
#level names of factors can be changed - mind the order of the elements!
levels(Shower$group) <- c("First group", "Second group", "Fourth group",
"Third group", "Fifth group", "Sixth group")
# Task 6
Shower_clean <- na.omit(Shower)
summary(Shower_clean) # all rows having NA values in one or many columns are now removed
```{r Simple Statistics}
# Task 5
# Task 6
# Task 7
# Task 8
# Task 9
#compare variance and square of standard deviation
#the comparison of numbers should be made considering a precision:
# Task 10
# Task 11
```{r Write and filter data}
# Task 12
# Task 13
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment