Skip to content

Commit

Permalink
Fix typos in subsection "6.3.2 How does pivoting work?" (#1534)
Browse files Browse the repository at this point in the history
* Add missing word

* Fix typo
  • Loading branch information
yvonnefroehlich authored Jul 16, 2023
1 parent c607d98 commit 6cc6b88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data-tidy.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand Down

0 comments on commit 6cc6b88

Please sign in to comment.