View source: R/monitor_filterDatetime.R
monitor_filterDatetime | R Documentation |
mts_monitor
objectsSubsets a mts_monitor object by datetime. This function
allows for sub-day filtering as opposed to monitor_filterDate()
which
always filters to day-boundaries.
Datetimes can be anything that is understood by
MazamaCoreUtils::parseDatetime()
. For non-POSIXct
values,
the recommended format is "YYYY-mm-dd HH:MM:SS"
.
If either startdate
or enddate
is not provided, the start/end of
the mts_monitor time axis will be used.
Timezone determination precedence assumes that if you are passing in
POSIXct
values then you know what you are doing.
get timezone from startdate
if it is POSIXct
use passed in timezone
get timezone from mts_monitor
monitor_filterDatetime(
monitor = NULL,
startdate = NULL,
enddate = NULL,
timezone = NULL,
unit = "sec",
ceilingStart = FALSE,
ceilingEnd = FALSE
)
monitor |
mts_monitor object. |
startdate |
Desired start datetime (ISO 8601). |
enddate |
Desired end datetime (ISO 8601). |
timezone |
Olson timezone used to interpret |
unit |
Units used to determine time at end-of-day. |
ceilingStart |
Logical specifying application of
|
ceilingEnd |
Logical specifying application of
|
A subset of the given mts_monitor object. (A list with
meta
and data
dataframes.)
monitor_filterDate
monitor_filterMeta
library(AirMonitor)
Camp_Fire %>%
monitor_timeRange()
# Reduced time range returned in "UTC"
Camp_Fire %>%
monitor_filterDatetime(
"2018-11-15 02:00:00",
"2018-11-22 06:00:00",
timezone = "America/Los_Angeles"
) %>%
monitor_timeRange()
# Reduced time range returned in "America/Los_Angeles"
Camp_Fire %>%
monitor_filterDatetime(
"2018111502",
"2018112206",
timezone = "America/Los_Angeles"
) %>%
monitor_timeRange(
timezone = "America/Los_Angeles"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.