Opens a Shiny application for quickly trimming the start and/or end of a
continuous monitoring deployment across every parameter at once, typically
because a sensor was out of the water before it started recording or
after it was retrieved. Removal is always linked so that a selection made
while viewing one parameter removes the same timestamps from every other
parameter. Unlike editASRflag, no QC flags are computed and
no DQO thresholds are involved. This is a coarse first pass meant to run
before other QC processes.
Arguments
- cont
contdatdata frame returned byreadASRcont, or thecontdatelement of a previouseditASRbulkresult for iterative editing.- removed
Optional data frame: the
removedelement returned by a previous call toeditASRbulk(or a compatibleremoveddata frame fromeditASRflag, since both share the sameParameter/DateTime/Valuecolumns). When supplied, the corresponding timestamps are pre-populated as removed (excluded from the plot, shown in the Removed Points table) without any new action.
Value
A list with two elements, invisibly returned after the app closes:
contdatA data frame with the same structure as the input
cont(sorted byDateTime), where every parameter at a removed timestamp is replaced withNA. Rows are retained with onlyDateTimepopulated.removedA data frame of all removed observations across all parameters, with columns
Parameter,DateTime, andValue. Can be passed as theremovedargument to a latereditASRbulk.
Details
This tool is intended only for trimming the edges of a deployment. A bad
stretch in the middle of a record (e.g., the sensor was pulled for
cleaning and redeployed mid-deployment) should be reviewed and removed
with editASRflag instead.
How to select a range
Zooming and panning with the plot toolbar is recommended to more easily identify the portion to remove. Hover over the plot and choose the Box Select or Lasso Select tool from the menu on the top right, then click and drag (box) or click and encircle (lasso) the points to remove. The removal applies to every parameter at those timestamps, not just the one currently displayed.
Only trim contiguous stretches at the very start or end of the record.
Do not use this app to remove a stretch from the middle of a deployment,
e.g., a period when the sensor was pulled for cleaning and redeployed;
review and remove that kind of gap with editASRflag
instead.
Controls
Parameter: drop-down selector to switch between parameters. Removed timestamps are shared across all parameters, so switching parameters never changes what has been removed.
Undo Last Removal: restores the most recently removed selection, across every parameter.
Start Over: undoes all removals made in the current session, reverting to the state the app was in when it opened. Any removals passed in via the
removedargument are preserved.Export Progress: saves the current cleaned data as an Excel file in a ZIP archive. If any points have been removed, a removed-observations file is included as well.
Done / Close: stops the app. Choosing Close, save edits returns the filtered data for all parameters whereas choosing Close, discard edits returns the original unmodified data. Closing the browser tab or window directly (without clicking Done / Close) also saves edits, equivalent to Close, save edits. Refreshing the page has the same effect.
Examples
if (FALSE) { # \dontrun{
contpth <- system.file("extdata/ExampleCont1.xlsx", package = "AquaSensR")
contdat <- readASRcont(contpth)
# First session: trim obvious out-of-water stretches
trimmed <- editASRbulk(contdat)
} # }
