sampling_sequence: Sampling frequency sequence

View source: R/frequency.R

sampling_sequenceR Documentation

Sampling frequency sequence

Description

Given a sampling period, the function will return the proportion of units of that period in secs, mins, hours, days, weeks, months and years, but will return NA for periods of higher frequency i.e. for a period of days it will return NA for secs, mins and hours. The function serves as a helper for seasonal periodicity calculations.

Usage

sampling_sequence(period)

Arguments

period

the period returned by a call to the function sampling_frequency.

Value

A named numeric vector.

Author(s)

Alexios Galanos

Examples

w <- sampling_sequence(sampling_frequency(seq(as.Date("2010-01-01"),
as.Date("2011-01-01"), by="weeks")))
m <- sampling_sequence(sampling_frequency(seq(as.POSIXct("2010-01-01 12:00:00"),
as.POSIXct("2010-01-02 12:00:00"), by="15 mins")))


tsaux documentation built on April 4, 2025, 3:08 a.m.