-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmts_filterDatetime.Rd
76 lines (63 loc) · 2.22 KB
/
mts_filterDatetime.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mts_filterDatetime.R
\name{mts_filterDatetime}
\alias{mts_filterDatetime}
\title{Datetime filtering for \emph{mts} time series objects}
\usage{
mts_filterDatetime(
mts = NULL,
startdate = NULL,
enddate = NULL,
timezone = NULL,
unit = "sec",
ceilingStart = FALSE,
ceilingEnd = FALSE,
includeEnd = FALSE
)
}
\arguments{
\item{mts}{\emph{mts} object.}
\item{startdate}{Desired start datetime (ISO 8601).}
\item{enddate}{Desired end datetime (ISO 8601).}
\item{timezone}{Olson timezone used to interpret dates.}
\item{unit}{Datetimes will be rounded to the nearest \code{unit}.}
\item{ceilingStart}{Logical instruction to apply
\code{\link[lubridate]{ceiling_date}} to the \code{startdate} rather than
\code{\link[lubridate]{floor_date}} when rounding.}
\item{ceilingEnd}{Logical instruction to apply
\code{\link[lubridate]{ceiling_date}} to the \code{enddate} rather than
\code{\link[lubridate]{floor_date}} when rounding.}
\item{includeEnd}{Logical specifying that records associated with \code{enddate}
should be included.}
}
\value{
A subset of the incoming \emph{mts} time series object.
(A list with \code{meta} and \code{data} dataframes.)
}
\description{
\strong{\code{DEPRECATED -- use \link{mts_setTimeAxis}}}.
Subsets an \code{mts} object by datetime. This function
allows for sub-day filtering as opposed to \code{mts_filterDate()} which
always filters to day-boundaries. Both the \code{startdate} and the
\code{enddate} will be included in the subset.
Datetimes can be anything that is understood by
\code{MazamaCoreUtils::parseDatetime()}. For non-\code{POSIXct} values,
the recommended format is \code{"YYYY-mm-dd HH:MM:SS"}.
Timezone determination precedence assumes that if you are passing in
\code{POSIXct} values then you know what you are doing:
\enumerate{
\item{get timezone from \code{startdate} if it is \code{POSIXct}}
\item{use passed in \code{timezone}}
\item{get timezone from \code{mts}}
}
}
\note{
This function is deprecated as of \strong{MazamaTimeSeries 0.2.15}.
Please use \link{mts_setTimeAxis} to shorten or lengthen the time axis
of an \emph{mts} object.
}
\seealso{
\link{mts_filterData}
\link{mts_filterDate}
\link{mts_filterMeta}
}