diff --git a/data-tidy.qmd b/data-tidy.qmd index bd0b59b..c9f962c 100644 --- a/data-tidy.qmd +++ b/data-tidy.qmd @@ -279,19 +279,19 @@ df |> How does the reshaping work? It's easier to see if we think about it column by column. -As shown in @fig-pivot-variables, the values in column that was already a variable in the original dataset (`id`) need to be repeated, once for each column that is pivoted. +As shown in @fig-pivot-variables, the values in a column that was already a variable in the original dataset (`id`) need to be repeated, once for each column that is pivoted. ```{r} #| label: fig-pivot-variables #| echo: false #| fig-cap: | #| Columns that are already variables need to be repeated, once for -#| each column that is pivotted. +#| each column that is pivoted. #| fig-alt: | #| A diagram showing how `pivot_longer()` transforms a simple #| dataset, using color to highlight how the values in the `id` column #| ("A", "B", "C") are each repeated twice in the output because there are -#| two columns being pivotted ("bp1" and "bp2"). +#| two columns being pivoted ("bp1" and "bp2"). knitr::include_graphics("diagrams/tidy-data/variables.png", dpi = 270) ```