Skip to content

Commit f6549a8

Browse files
committed
Address tidyselect deprecations
- Don't use `.data` in tidyselect syntax; apply deprecation warning's suggestion to use quoted column names instead (but don't change the many places where we are using unquoted column names without the use of `.data$`). - Don't use deprecated, ambiguous `select(character_vector_containing_colnames)` tidyselect syntax.
1 parent 3ddd63d commit f6549a8

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

R/archive.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ epi_archive =
477477
unique(by = c("geo_value", "time_value", other_keys),
478478
fromLast = TRUE) %>%
479479
tibble::as_tibble() %>%
480-
dplyr::select(-.data$version) %>%
480+
dplyr::select(-"version") %>%
481481
as_epi_df(geo_type = self$geo_type,
482482
time_type = self$time_type,
483483
as_of = max_version,

R/epi_df.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ new_epi_df = function(x = tibble::tibble(), geo_type, time_type, as_of,
159159

160160
# Reorder columns (geo_value, time_value, ...)
161161
if(sum(dim(x)) != 0){
162-
x = dplyr::relocate(x, .data$geo_value, .data$time_value)
162+
x = dplyr::relocate(x, "geo_value", "time_value")
163163
}
164164

165165
# Apply epi_df class, attach metadata, and return

R/methods-epi_df.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
#' @export
1313
as_tsibble.epi_df = function(x, key, ...) {
1414
if (missing(key)) key = c("geo_value", attributes(x)$metadata$other_keys)
15-
return(as_tsibble(tibble::as_tibble(x), key, index = "time_value", ...))
15+
return(as_tsibble(tibble::as_tibble(x),
16+
key = tidyselect::all_of(key), index = "time_value",
17+
...))
1618
}
1719

1820
#' Base S3 methods for an `epi_df` object

0 commit comments

Comments
 (0)