Fix typos in subsection "6.3.2 How does pivoting work?" (#1534)

* Add missing word

* Fix typo
This commit is contained in:
Yvonne Fröhlich 2023-07-16 14:28:14 +02:00 committed by GitHub
parent c607d980f7
commit 6cc6b88438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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)
```