TuomoNieminen / Helsinki-Open-Data-Science

A DataCamp course for the University of Helsinki
https://www.datacamp.com/courses/helsinki-open-data-science
11 stars 10 forks source link

IODS-update-needed-with-tidyverse-in-last-chapter #10

Open avlehtim opened 2 years ago

avlehtim commented 2 years ago

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).

gdrouard commented 2 years ago

other slight change: argument fun.y of the _statsummary function replaced by fun as fun.y is deprecated (warning message)

gdrouard commented 2 years ago

fixed; need to be built.