diff --git a/vignettes/classroom.csv b/vignettes/classroom.csv deleted file mode 100644 index 42adbd5f..00000000 --- a/vignettes/classroom.csv +++ /dev/null @@ -1,5 +0,0 @@ -"name","quiz1","quiz2","test1" -"Billy",NA,"D","C" -"Suzy","F",NA,NA -"Lionel","B","C","B" -"Jenny","A","A","B" diff --git a/vignettes/classroom2.csv b/vignettes/classroom2.csv deleted file mode 100644 index b039b09b..00000000 --- a/vignettes/classroom2.csv +++ /dev/null @@ -1,4 +0,0 @@ -"assessment","Billy","Suzy","Lionel","Jenny" -"quiz1",NA,"F","B","A" -"quiz2","D",NA,"C","A" -"test1","C",NA,"B","B" diff --git a/vignettes/tidy-data.Rmd b/vignettes/tidy-data.Rmd index 2bf153a8..f695ef4c 100644 --- a/vignettes/tidy-data.Rmd +++ b/vignettes/tidy-data.Rmd @@ -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 ``` @@ -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 ```