Skip to content

Commit

Permalink
Merged upstream/main into stand
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Oct 24, 2024
2 parents 9e3c8a0 + fcedd52 commit b47ac9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions vignettes/classroom.csv

This file was deleted.

4 changes: 0 additions & 4 deletions vignettes/classroom2.csv

This file was deleted.

4 changes: 4 additions & 0 deletions vignettes/tidy-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ billboard3 %>% arrange(date, rank)
After pivoting columns, the key column is sometimes a combination of multiple underlying variable names. This happens in the `tb` (tuberculosis) dataset, shown below. This dataset comes from the World Health Organisation, and records the counts of confirmed tuberculosis cases by `country`, `year`, and demographic group. The demographic groups are broken down by `sex` (m, f) and `age` (0-14, 15-25, 25-34, 35-44, 45-54, 55-64, unknown).

```{r}
# To run this on your own:
# tb <- readr::read_csv("https://raw.githubusercontent.com/tidyverse/tidyr/main/vignettes/tb.csv")
tb <- as_tibble(read.csv("tb.csv", stringsAsFactors = FALSE))
tb
```
Expand Down Expand Up @@ -244,6 +246,8 @@ tb %>% pivot_longer(
The most complicated form of messy data occurs when variables are stored in both rows and columns. The code below loads daily weather data from the Global Historical Climatology Network for one weather station (MX17004) in Mexico for five months in 2010.

```{r}
# To run this on your own:
# weather <- readr::read_csv("https://raw.githubusercontent.com/tidyverse/tidyr/main/vignettes/weather.csv")
weather <- as_tibble(read.csv("weather.csv", stringsAsFactors = FALSE))
weather
```
Expand Down

0 comments on commit b47ac9e

Please sign in to comment.