::: {.cell hash='03_Data_preprocessing_cache/revealjs/unnamed-chunk-59_3c3372d504bc0dd94acb127027615a63'}

```{.r .cell-code}
pivot_wider(table2, 
            names_from=type, 
            values_from=count)
```

::: {.cell-output .cell-output-stdout}
```
# A tibble: 6 × 4
  country      year  cases population
  <chr>       <dbl>  <dbl>      <dbl>
1 Afghanistan  1999    745   19987071
2 Afghanistan  2000   2666   20595360
3 Brazil       1999  37737  172006362
4 Brazil       2000  80488  174504898
5 China        1999 212258 1272915272
6 China        2000 213766 1280428583
```
:::
:::