mts_filterDatetime {MazamaTimeSeries} | R Documentation |
Datetime filtering for mts time series objects
Description
DEPRECATED -- use mts_setTimeAxis
.
Subsets an mts
object by datetime. This function
allows for sub-day filtering as opposed to mts_filterDate()
which
always filters to day-boundaries. Both the startdate
and the
enddate
will be included in the subset.
Datetimes can be anything that is understood by
MazamaCoreUtils::parseDatetime()
. For non-POSIXct
values,
the recommended format is "YYYY-mm-dd HH:MM:SS"
.
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 isPOSIXct
use passed in
timezone
get timezone from
mts
Usage
mts_filterDatetime(
mts = NULL,
startdate = NULL,
enddate = NULL,
timezone = NULL,
unit = "sec",
ceilingStart = FALSE,
ceilingEnd = FALSE,
includeEnd = FALSE
)
Arguments
mts |
mts object. |
startdate |
Desired start datetime (ISO 8601). |
enddate |
Desired end datetime (ISO 8601). |
timezone |
Olson timezone used to interpret dates. |
unit |
Datetimes will be rounded to the nearest |
ceilingStart |
Logical instruction to apply
|
ceilingEnd |
Logical instruction to apply
|
includeEnd |
Logical specifying that records associated with |
Value
A subset of the incoming mts time series object.
(A list with meta
and data
dataframes.)
Note
This function is deprecated as of MazamaTimeSeries 0.2.15. Please use mts_setTimeAxis to shorten or lengthen the time axis of an mts object.