.collapse_timestamp | R Documentation |
Util to collapse the TIMESTAMP using lubridate::*_date functions
.collapse_timestamp(timestamp, ..., period, side = "start")
A vector of the same length as TIMESTAMP, with the collapsed timestamp with the same tz as the original one.
Periods accepted are in the "number period" format, as in
floor_date
or a custom function name without quotes:
hours (exs. "1 hour", "12 hours")
days (exs. "1 day", "3 days")
weeks (exs. "1 week", "4 weeks")
months (exs. "1 month", "6 months")
years (exs. "1 year", "7 years")
Also a custom function can be supplied, one that transforms the
TIMESTAMP variable to the collapsed timestamp desired. See
sfn_metrics
for details
Side indicates if using floor_date
(side = "start) or
ceiling_date
(side = 'end'). Ceiling dates is not
trivial, see ceiling_date
for information on how
the date will be ceiled.
arg_tre_timestamp <- get_timestamp(ARG_TRE) sapfluxnetr:::.collapse_timestamp( arg_tre_timestamp, period = "1 day", side = 'start' )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.