dot-collapse_timestamp: .collapse_timestamp helper

Description Usage Value Period Side Examples

Description

Util to collapse the TIMESTAMP using lubridate::*_date functions

Usage

1
.collapse_timestamp(timestamp, ..., period, side = "start")

Value

A vector of the same length as TIMESTAMP, with the collapsed timestamp with the same tz as the original one.

Period

Periods accepted are in the "number period" format, as in floor_date or a custom function name without quotes:

Side

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.

Examples

1
2
3
4
arg_tre_timestamp <- get_timestamp(ARG_TRE)
sapfluxnetr:::.collapse_timestamp(
  arg_tre_timestamp, period = "1 day", side = 'start'
)

sapfluxnetr documentation built on Aug. 28, 2020, 1:13 a.m.