Read R4DS chapter 12.
Solve Introduction and exploring raw data and Tidying data of the Cleaning Data in R course at DataCamp.
Class_files/Statistikdatabasen_2019-11-14 23_25_40.csv
contains records of adults visiting dental care by sex, municipality and year (downloaded from The National Board of Health and Welfare dental health records). Read it withdental_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 gather
to convert it to long (“tidy”) format.
Class_files/Statistikdatabasen_2018-01-23 15_04_12.csv
contains records of suicides and death totals by sex, county and year (from The National Board of Health and Welfare). Read it withdata <- 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.
The file Class_files/Statistikdatabasen_2018-01-23 15_39_06.csv
contains monthly records of social assistance (ekonomiskt bistånd). Explore it in a spread sheet and transform to “tidy format” containing the variable average payment per houshold (Utbetalt ekonomiskt bistånd tkr
divided by Antal hushåll
) for each month and county. It may be helpful to join the first two columns using paste
.
Examination of the course Matematik I (MM2001) consists a large number of smaller labs/exams with individual codes (Provkoder), see the course plan for a full list. The file Class_files/MM2001.csv
contains results for 100 randomly chosen students exported using and older version of Ladok. Each row corresponds to one student (name and id removed). Transform data (or a subset of data) to a tidy format.