Skip to content

Commit 4fb915d

Browse files
committed
Rename table4 and table5 to make connection more clear
1 parent 52aabaf commit 4fb915d

File tree

12 files changed

+44
-18
lines changed

12 files changed

+44
-18
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# tidyr 0.5.1.9000
22

3+
* Renamed `table4` and `table5` to `table4a` and `table4b` to make their
4+
connection more clear.
5+
36
* `full_seq()` works correctly for dates and date/times.
47

58
# tidyr 0.5.1

R/data.R

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,35 @@
1818
"who"
1919

2020

21-
#' tabular layouts
21+
#' Example tabular representations
2222
#'
2323
#' Data sets that demonstrate multiple ways to layout the same tabular data.
2424
#'
25-
#' \code{table1}, \code{table2}, \code{table3}, \code{table4}, \code{table5}, and \code{table6} all display the number of TB cases documented by the World Health Organization in Afghanistan, Brazil, and China between 1999 and 2000. The data contains values associated with four variables (country, year, cases, and population), but each table organizes the values in a different layout.
25+
#' \code{table1}, \code{table2}, \code{table3}, \code{table4a}, \code{table4b}, and \code{table5} all display the number of TB cases documented by the World Health Organization in Afghanistan, Brazil, and China between 1999 and 2000. The data contains values associated with four variables (country, year, cases, and population), but each table organizes the values in a different layout.
2626
#'
2727
#' The data is a subset of the data contained in the World Health
2828
#' Organization Global Tuberculosis Report
2929
#'
30-
#'
3130
#' @source \url{http://www.who.int/tb/country/data/download/en/}
32-
#'
33-
#' @aliases table2 table3 table4 table5 table6
34-
#'
3531
"table1"
3632

33+
#' @rdname table1
34+
"table2"
35+
36+
#' @rdname table1
37+
"table3"
38+
39+
#' @rdname table1
40+
"table4a"
41+
42+
#' @rdname table1
43+
"table4b"
44+
45+
#' @rdname table1
46+
"table5"
47+
48+
49+
3750
#' Population data
3851
#'
3952
#' Populations of 219 countries for 1995-2013.

data-raw/tables.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,30 @@ table3 <-
2626
table1 %>%
2727
unite("rate", cases, population, sep = "/")
2828

29-
table4 <-
29+
table4a <-
3030
table1 %>%
3131
select(country, year, cases) %>%
3232
spread(year, cases)
3333

34-
table5 <-
34+
table4b <-
3535
table1 %>%
3636
select(country, year, population) %>%
3737
spread(year, population)
3838

39-
table6 <-
39+
table5 <-
4040
table3 %>%
4141
separate(year, into = c("century", "year"), sep = 2)
4242

4343
write_csv(table1, "data-raw/table1.csv")
4444
write_csv(table2, "data-raw/table2.csv")
4545
write_csv(table3, "data-raw/table3.csv")
46-
write_csv(table4, "data-raw/table4.csv")
47-
write_csv(table5, "data-raw/table5.csv")
48-
write_csv(table6, "data-raw/table6.csv")
46+
write_csv(table4a, "data-raw/table4a.csv")
47+
write_csv(table4b, "data-raw/table4b.csv")
48+
write_csv(table5, "data-raw/table6.csv")
4949

5050
save(table1, file = "data/table1.rdata")
5151
save(table2, file = "data/table2.rdata")
5252
save(table3, file = "data/table3.rdata")
53-
save(table4, file = "data/table4.rdata")
53+
save(table4a, file = "data/table4a.rdata")
54+
save(table4b, file = "data/table4b.rdata")
5455
save(table5, file = "data/table5.rdata")
55-
save(table6, file = "data/table6.rdata")

data/table3.rdata

-3 Bytes
Binary file not shown.

data/table4.rdata

-208 Bytes
Binary file not shown.

data/table4a.rdata

208 Bytes
Binary file not shown.

data/table4b.rdata

212 Bytes
Binary file not shown.

data/table5.rdata

76 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)