Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: epiprocess
Title: Tools for basic signal processing in epidemiology
Version: 0.11.0
Version: 0.11.1
Authors@R: c(
person("Jacob", "Bien", role = "ctb"),
person("Logan", "Brooks", , "[email protected]", role = c("aut", "cre")),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export(group_modify)
export(growth_rate)
export(growth_rate_params)
export(guess_period)
export(is_epi_archive)
export(is_epi_df)
export(is_grouped_epi_archive)
export(key_colnames)
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.x.y will indicate PR's.

# epiprocess 0.12

## New features

- `is_epi_archive` function has been reintroduced.

# epiprocess 0.11

## Breaking changes
Expand Down
27 changes: 23 additions & 4 deletions R/archive.R
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,12 @@ next_after.Date <- function(x) x + 1L
#' value of `clobberable_versions_start` does not fully trust these empty
#' updates, and assumes that any version `>= max(x$version)` could be
#' clobbered.) If `nrow(x) == 0`, then this argument is mandatory.
#' @return An `epi_archive` object.
#' @return * Of `new_epi_archive`: an (unvalidated) `epi_archive`
#'
#' @seealso [`epix_as_of`] [`epix_merge`] [`epix_slide`]
#' @importFrom dplyr if_any if_all everything
#' @importFrom utils capture.output
#'
#' @name epi_archive
#' @export
#'
#' @examples
#' # Simple ex. with necessary keys
#' tib <- tibble::tibble(
Expand Down Expand Up @@ -277,6 +274,9 @@ next_after.Date <- function(x) x + 1L
#'
#' x <- df %>% as_epi_archive(other_keys = "county")
#'
#' @name epi_archive
#' @order 3
#' @export
new_epi_archive <- function(
x,
geo_type,
Expand Down Expand Up @@ -329,7 +329,11 @@ new_epi_archive <- function(

#' Perform second (costly) round of validation that `x` is a proper `epi_archive`
#'
#' @return * Of `validate_epi_archive`: an `epi_archive`,
#' [invisibly][base::invisible] (or raises an error if `x` was invalid)
#'
#' @rdname epi_archive
#' @order 4
#' @export
validate_epi_archive <- function(x) {
assert_class(x, "epi_archive")
Expand Down Expand Up @@ -515,8 +519,10 @@ is_locf <- function(vec, abs_tol, is_key) { # nolint: object_usage_linter
#' @param .versions_end location based versions_end, used to avoid prefix
#' `version = issue` from being assigned to `versions_end` instead of being
#' used to rename columns.
#' @return * Of `as_epi_archive`: an `epi_archive` object
#'
#' @rdname epi_archive
#' @order 1
#'
#' @export
as_epi_archive <- function(
Expand Down Expand Up @@ -808,3 +814,16 @@ clone.epi_archive <- function(x) {
x$DT <- data.table::copy(x$DT)
x
}

#' Test for `epi_archive` format
#'
#' @param x An object.
#' @return * Of `is_epi_archive`: `TRUE` if the object inherits from `epi_archive`,
#' otherwise `FALSE`.
#'
#' @rdname epi_archive
#' @order 2
#' @export
is_epi_archive <- function(x) {
inherits(x, "epi_archive")
}
82 changes: 51 additions & 31 deletions man/epi_archive.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.