It is all about the last chapter, 6.Analysis of longitudinal data,
where we convert the data sets between long and wide formats.
Since creating this chapter (it was added later than the other ones and coded by Petteri Mäntymaa, one of the assistants and stats students at the time), the tidyverse functions have been re-written, see:
Especially this first point on that page ("Getting started"):
“Pivotting” which converts between long and wide forms. tidyr 1.0.0 introduces pivot_longer() and pivot_wider(), replacing the older spread() and gather() functions. See vignette("pivot") for more details.
So, our code was built before tidyr 1.0.0, using spread() and gather(). Those function should be replaced by the above pivotting functions.
Should be fairly straight-forward, I think. Must revise the DataCamp instructions, too (and check the RStudio exercise).
This is an update that should be done ASAP:
(although the code still works)
It is all about the last chapter, 6.Analysis of longitudinal data, where we convert the data sets between long and wide formats.
Since creating this chapter (it was added later than the other ones and coded by Petteri Mäntymaa, one of the assistants and stats students at the time), the tidyverse functions have been re-written, see:
https://tidyr.tidyverse.org/
Especially this first point on that page ("Getting started"):
So, our code was built before tidyr 1.0.0, using spread() and gather(). Those function should be replaced by the above pivotting functions.
Should be fairly straight-forward, I think. Must revise the DataCamp instructions, too (and check the RStudio exercise).