Skip to content

Commit d7a2872

Browse files
committed
change all additional_metadata to list
1 parent ca02bc9 commit d7a2872

File tree

9 files changed

+51
-65
lines changed

9 files changed

+51
-65
lines changed

R/epi_df.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ new_epi_df = function(x = tibble::tibble(), geo_type, time_type, as_of,
251251
#' dplyr::mutate(
252252
#' state = rep("MA",6),
253253
#' pol = rep(c("blue", "swing", "swing"), each = 2)) %>% # 2 extra keys
254-
#' as_epi_df(additional_metadata = list(other_keys = "state", "pol")) %>%
254+
#' as_epi_df(additional_metadata = list(other_keys = "state", "pol"))
255255
#'
256256
#' attr(ex3,"metadata")
257257
as_epi_df = function(x, ...) {

man/as_epi_archive.Rd

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/as_epi_df.Rd

Lines changed: 10 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epi_archive.Rd

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epi_slide.Rd

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epix_as_of.Rd

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/epix_slide.Rd

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-methods-epi_df.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ toy_epi_df <- tibble::tibble(
88
), times = 2),
99
geo_value = rep(c("ca", "hi"), each = 5),
1010
indicator_var = as.factor(rep(1:2, times = 5)),
11-
) %>% as_epi_df(additional_metadata = c(other_keys = "indicator_var"))
11+
) %>% as_epi_df(additional_metadata = list(other_keys = "indicator_var"))
1212

1313
att_toy = attr(toy_epi_df, "metadata")
1414

vignettes/epiprocess.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ head(ex2)
180180
181181
ex2 <- ex2 %>% rename(geo_value = state, time_value = reported_date) %>%
182182
as_epi_df(geo_type = "state", as_of = "2020-06-03",
183-
additional_metadata = c(other_keys = "pol"))
183+
additional_metadata = list(other_keys = "pol"))
184184
185185
attr(ex2,"metadata")
186186
```
@@ -206,7 +206,7 @@ Now we add state (MA) as a new column and a key to the metadata. Reminder that l
206206
ex3 <- ex3 %>%
207207
as_tibble() %>% # needed to add the additional metadata
208208
mutate(state = rep(tolower("MA"),6)) %>%
209-
as_epi_df(additional_metadata = c(other_keys = "state"))
209+
as_epi_df(additional_metadata = list(other_keys = "state"))
210210
211211
attr(ex3,"metadata")
212212
```

0 commit comments

Comments
 (0)