Commit b7154180 authored by Weigert, Andreas's avatar Weigert, Andreas
Browse files

corrected mistake in Tutorial 1, exercise 33

parent 5ff3b9e8
......@@ -132,13 +132,13 @@ Age <- c(29,23,56,35)
Nationality <- as.factor(c("DE","US","DE","SE"))
# Exercise 33
students <- data.frame(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")))
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(876, 563, 345, 939),
students <- data.frame(ID=as.numeric(c(876, 563, 345, 939)),
Name=as.character(c("Michael", "Susan", "Hans", "Björn")),
Age=as.numeric(c(29,23,56,35)),
Nationality=as.factor(c("DE","US","DE","SE")),
......
Markdown is supported
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