.period_to_minutes {sapfluxnetr} | R Documentation |
transform period to minutes
Description
helper for data_coverage
Usage
.period_to_minutes(period, timestamp, timestep, ...)
Arguments
period |
character indicating the period to summarise or a custom function name (without quotes). |
timestamp |
timestamp vector obtained from data |
timestep |
numeric with the timestep in minutes, obtained from metadata |
... |
extra arguments for period if it is a function |
Details
This function converts the period supplied into minutes to use it in the coverage calculation.
Value
An integer with the period value in minutes
Examples
# daily period, expected 1440 minutes
sapfluxnetr:::.period_to_minutes('1 day')
# Using a custom function, we need timestamp and timestep
sapfluxnetr:::.period_to_minutes(
lubridate::as_date, get_timestamp(ARG_TRE), 30
)
[Package sapfluxnetr version 0.1.4 Index]