
Last day of laboratory-complete environmental surveillance
Source:R/es_performance.R
es_complete_end.RdFinds the last day of the collection period whose samples have largely come
back from the laboratory. A collection month fails when fewer than
resolved_min of its samples are resolved. The period ends the day before
the earliest failing month that is no older than settle_months before the
month of as_of. A month older than that is taken as final even if it never
reached resolved_min, so it no longer holds the period back. When no month
fails, the period ends on the last day of the latest sampled month. The
result is never later than as_of.
Usage
es_complete_end(
resolution,
as_of = Sys.Date(),
resolved_min = 0.8,
settle_months = 3L
)Arguments
- resolution
A monthly summary with columns
month(the first day of each collection month) andresolved_share(between 0 and 1), as returned bycalc_es_resolution().- as_of
The reporting date, as a
Dateor a string thatas.Date()reads. Defaults toSys.Date(). The result is never later than it.- resolved_min
Share of a month's samples that must be resolved for the month to count as complete. Default
0.80.- settle_months
Number of months after which a month still below
resolved_minis taken as final. Default3.