This file is part of the lecture Business Intelligence & Analytics (EESYS-BIA-M), Information Systems and Energy Efficient Systems, University of Bamberg.
```{r Exercise: Working with lists}
# Exercise 27
list_data <- list(text, u, x, A)
# Exercise 28
list_data[[2]]
# Exercise 29
list_data[[2]][3]
# Exercise 30
names(list_data) <- c("text", "u", "x", "A")
# Exercise 31
list_data
# Exercise 32
list_data$A
```
```{r Exercise: Working with data frames}
# For Exercise 33
ID <- c(876, 563, 345, 939)
Name <- as.character(c("Michael", "Susan", "Hans", "Björn"))
Age <- c(29,23,56,35)
Nationality <- as.factor(c("DE","US","DE","SE"))
# Exercise 33
students <- data.frame(ID=ID,
Name=Name,
Age=Age,
Nationality=Nationality)
# Long command: If you do not use proper datatypes and enhance the data.frame command by "stringsAsFactors = F", data types might not be correct.
students <- data.frame(ID=as.numeric(c(876, 563, 345, 939)),
This file is part of the lecture Business Intelligence & Analytics (EESYS-BIA-M), Information Systems and Energy Efficient Systems, University of Bamberg.
```{r Exercise: Working with lists}
# Exercise 27
# Exercise 28
# Exercise 29
# Exercise 30
# Exercise 31
# Exercise 32
```
```{r Exercise: Working with data frames}
# For Exercise 33
ID <- c(876, 563, 345, 939)
Name <- as.character(c("Michael", "Susan", "Hans", "Björn"))