Note: You need to install the packages nycflights13 and tidyverse in order to complete the exercises.
05transform1-resources.zip
from the course website, read codebook.txt
and complete the following tasks:
schulen_potsdam.csv
into R without specifying further parameters for read.csv()
. Have a look at the data using functions like str()
and head()
. Do you spot any potential problems?read.csv()
: stringsAsFactors = FALSE, colClasses = c(plz = "character")
. Inspect the result. What is the effect of these parameters? Are all problems now fixed and do the variable types match the specifications in the codebook (see codebook.txt
also contained in the zip-file)? If not, convert these variables to the correct data type using mutate()
and as.factor()
.full_address
using mutate()
. This new variable should contain the full address consisting of street name, zip code and city name, e.g. “Carl-von-Ossietzky-Straße 37 01570 Potsdam”. You can combine several strings to form one string using the function paste()
.