diff --git a/data-tidy.qmd b/data-tidy.qmd index c45af01..b563874 100644 --- a/data-tidy.qmd +++ b/data-tidy.qmd @@ -351,7 +351,7 @@ If you stare at these columns for long enough, you'll notice there's a pattern. Each column name is made up of three pieces separated by `_`. The first piece, `sp`/`rel`/`ep`, describes the method used for the `diagnosis`, the second piece, `m`/`f` is the `gender`, and the third piece, `014`/`1524`/`2535`/`3544`/`4554`/`65` is the `age` range. -So in this case we have six variables: two variables are already columns, three variables are contained in the column name, and one variable is in the cell name. +So in this case we have six variables: two variables are already columns, three variables are contained in the column name, and one variable is in the cell value. This requires two changes to our call to `pivot_longer()`: `names_to` gets a vector of column names and `names_sep` describes how to split the variable name up into pieces: ```{r}