Intermezzo: missing values (6)
Suppose we have this, and you want to make it wide and add zeros, not NA
s:
## # A tibble: 4 × 3
## year type percentage
## <dbl> <fct> <dbl>
## 1 2018 A 100
## 2 2019 B 100
## 3 2020 A 40
## 4 2020 B 60
## # A tibble: 1 × 4
## `2018_A` `2019_B` `2020_A` `2020_B`
## <dbl> <dbl> <dbl> <dbl>
## 1 100 100 40 60
That’s not it…