epiprocess 0.3.0
Breaking changes
as_epi_archive
,epi_archive$new
:- Compactification (see below) by default may change results if working
directly with theepi_archive
'sDT
field; to disable, pass in
compactify=FALSE
.
- Compactification (see below) by default may change results if working
epi_archive
's wrappers and R6 methods have been updated to follow these
rules regarding reference semantics:epix_<method>
will not mutate inputepi_archive
s, but may alias them
or alias their fields (which should not be a worry if a user sticks to
theseepix_*
functions and "regular" R functions with
copy-on-write-like behavior, avoiding mutating functions[.data.table
).x$<method>
may mutatex
; if it mutatesx
, it will returnx
invisibly (where this makes sense), and, for each of its fields, may
either mutate the object to which it refers or reseat the reference (but
not both); ifx$<method>
does not mutatex
, its result may contain
aliases tox
or its fields.
epix_merge
,<epi_archive>$merge
:- Removed
...
,locf
, andnan
parameters. - Changed the default behavior, which now corresponds to using
by=key(x$DT)
(but demanding that is the same set of column names as
key(y$DT)
),all=TRUE
,locf=TRUE
,nan=NaN
(but with the
post-filling step fixed to only apply to gaps, and no longer fill over
NA
s originating fromx$DT
andy$DT
). x
andy
are no longer allowed to share names of non-by
columns.epix_merge
no longer mutates itsx
argument (but$merge
continues
to do so).- Removed (undocumented) capability of passing a
data.table
asy
.
- Removed
epix_slide
:- Removed inappropriate/misleading
n=7
default argument (due to
reporting latency,n=7
will not yield 7 days of data in a typical
daily-reporting surveillance data source, as one might have assumed).
- Removed inappropriate/misleading
New features
as_epi_archive
,epi_archive$new
:- New
compactify
parameter allows removal of rows that are redundant for the
purposes ofepi_archive
's methods, which use the last version of each
observation carried forward. - New
clobberable_versions_start
field allows marking a range of versions
that could be "clobbered" (rewritten without assigning new version
tags); previously, this was hard-coded asmax(<epi_archive>$DT$version)
. - New
versions_end
field allows marking a range of versions beyond
max(<epi_archive>$DT$version)
that were observed, but contained no
changes.
- New
epix_merge
,$merge
:- New
sync
parameter controls what to do ifx
andy
aren't equally
up to date (i.e., ifx$versions_end
andy$versions_end
are
different).
- New
- New function
epix_fill_through_version
, method
<epi_archive>$fill_through_version
: non-mutating & mutating way to
ensure that an archive contains versions at least through some
fill_versions_end
, extrapolating according tohow
if necessary. - Example archive data object is now constructed on demand from its
underlying data, so it will be based on the user's version of
epi_archive
rather than an outdated R6 implementation from whenever the
data object was generated.
Full Changelog: https://github.com/cmu-delphi/epiprocess/commits/v0.3.0