Skip to content

Commit fc841bf

Browse files
committed
Nat's suggestions
1 parent 7c6d7cb commit fc841bf

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

R/archive.R

+4-2
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ validate_epi_archive <- function(
441441

442442
#' `as_epi_archive` converts a data frame, data table, or tibble into an
443443
#' `epi_archive` object.
444-
#' @param ... used for specifying column names, such as `version = release_date`
444+
#' @param ... used for specifying column names, as in [`dplyr::rename`]. For
445+
#' example `version = release_date`
445446
#'
446447
#' @rdname epi_archive
447448
#'
@@ -462,7 +463,8 @@ as_epi_archive <- function(
462463
x <- guess_column_name(x, "version", version_column_names())
463464
if (!test_subset(c("geo_value", "time_value", "version"), names(x))) {
464465
cli_abort(
465-
"Columns `geo_value`, `time_value`, and `version` must be present in `x`."
466+
"Either columns `geo_value`, `time_value`, and `version` must be present in `x`, or related columns (see the internal
467+
functions `guess_time_column_name()`, `guess_geo_column_name()` and/or `guess_geo_version_name()` for complete list)."
466468
)
467469
}
468470
if (anyMissing(x$version)) {

R/epi_df.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ NULL
9595
#'
9696
#' @export
9797
new_epi_df <- function(x = tibble::tibble(), geo_type, time_type, as_of,
98-
additional_metadata = list(), ...) {
98+
additional_metadata = list()) {
9999
assert_data_frame(x)
100100
assert_list(additional_metadata)
101101

@@ -279,7 +279,7 @@ as_epi_df.tbl_df <- function(x, geo_type, time_type, as_of,
279279

280280
new_epi_df(
281281
x, geo_type, time_type, as_of,
282-
additional_metadata, ...
282+
additional_metadata
283283
)
284284
}
285285

man/epi_archive.Rd

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/new_epi_df.Rd

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)