monitor_subsetData: Subset ws_monitor Object 'data' Dataframe

Description Usage Arguments Details Value

View source: R/monitor_subsetData.R

Description

Subsets a ws_monitor object's data dataframe by removing any monitors that lie outisde the specified ranges of time and values and that are not mentioned in the list of monitorIDs.

If tlim or vlim is not specified, it will not be used in the subsetting.

Intended for use by the monitor_subset function.

Usage

1
2
3
4
5
6
7
8
monitor_subsetData(
  data,
  tlim = NULL,
  vlim = NULL,
  monitorIDs = NULL,
  dropMonitors = FALSE,
  timezone = "UTC"
)

Arguments

data

ws_monitor object data dataframe

tlim

optional vector with start and end times (integer or character representing YYYYMMDD[HH] or POSIXct)

vlim

optional vector with low and high data value limits

monitorIDs

optional vector of monitorIDs

dropMonitors

flag specifying whether to remove columns – defaults to FALSE

timezone

Olson timezone passed to parseDatetime when parsing numeric tlim

Details

By default, filtering by tlim or vlim will always return a dataframe with the same number of columns as the incoming dataframe. If dropMonitors=TRUE, columns will be removed if there are not valid data for a specific monitor after subsetting.

Filtering by vlim is open on the left and closed on the right, i.e.

x > vlim[1] & x <= vlim[2]

Value

A ws_monitor object data dataframe, or NULL if filtering removes all monitors.


PWFSLSmoke documentation built on Nov. 23, 2021, 5:06 p.m.