Material

Read R4DS chapter 12.

Solve the chapters Tidy Data and From Wide to Long and Back of the Reshaping Data with tidyr course at DataCamp.

During class

dental_data <- read_csv2("class_files/Statistikdatabasen_2019-11-14 23_25_40.csv", skip = 1, n_max = 580)

(why skip = 1 and n_max = 580?) and use pivot_longer to convert it to long (“tidy”) format.

data <- read_csv2("class_files/Statistikdatabasen_2018-01-23 15_04_12.csv", skip = 1, n_max = 80)

and plot the proportion of suicides among death totals, by year, for the whole country.