Skip to content

Commit 500a952

Browse files
committed
formatting
1 parent 76388e2 commit 500a952

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

R/archive.R

+6-2
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,9 @@ validate_epi_archive <- function(
444444
#' `epi_archive` object.
445445
#' @param ... used for specifying column names, as in [`dplyr::rename`]. For
446446
#' example `version = release_date`
447+
#' @param .versions_end location based versions_end, used to avoid prefix
448+
#' `version = issue` from being assigned to `versions_end` instead of being
449+
#' used to rename columns.
447450
#'
448451
#' @rdname epi_archive
449452
#'
@@ -465,8 +468,9 @@ as_epi_archive <- function(
465468
x <- guess_column_name(x, "version", version_column_names())
466469
if (!test_subset(c("geo_value", "time_value", "version"), names(x))) {
467470
cli_abort(
468-
"Either columns `geo_value`, `time_value`, and `version` must be present in `x`, or related columns (see the internal
469-
functions `guess_time_column_name()`, `guess_geo_column_name()` and/or `guess_geo_version_name()` for complete list)."
471+
"Either columns `geo_value`, `time_value`, and `version` must be present in `x`,
472+
or related columns (see the internal functions `guess_time_column_name()`,
473+
`guess_geo_column_name()` and/or `guess_geo_version_name()` for complete list)."
470474
)
471475
}
472476
if (anyMissing(x$version)) {

man/epi_archive.Rd

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

tests/testthat/test-archive.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ test_that("as_epi_archive custom name mapping works correctly", {
3333
as_epi_archive(dt)
3434
))
3535

36-
expect_error(as_epi_archive(rename(dt, weirdName = version), version = weirdName, version = time_value), "Names must be unique")
36+
expect_error(as_epi_archive(rename(dt, weirdName = version),
37+
version = weirdName, version = time_value
38+
), "Names must be unique")
3739
})
3840

3941
test_that("other_keys can only contain names of the data.frame columns", {

0 commit comments

Comments
 (0)