dot-period_to_minutes: transform period to minutes

Description Usage Arguments Details Value Examples

Description

helper for data_coverage

Usage

1
.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

1
2
3
4
5
6
7
# 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
)

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