f.minutely {tdata}R Documentation

Create a Minute-ly Frequency

Description

Use this function to create a frequency for time-series data that occurs every minute in a day or a subset of a week.

Usage

f.minutely(day, minute)

Arguments

day

A 'Day-based' object of class ldtf, such as Daily or Daily-In-Week.

minute

The index of the minute in the day, which should be between 1 and 1440.

Details

In order to use the as.frequency function for this type of frequency, you need the following information:

Value

An object of class ldtf. It is also a list with the following members:

class

Determines the class of this frequency.

day

Determines the day.

minute

Determines the minute.

Examples


mi0 <- f.minutely(f.daily(c(2023,5,16)),1200)

mi0_value_str <-  as.character(mi0) # this will be '20230516:1200'.
mi0_class_str <- get.class.id(mi0)
#     this will be 'mi|d'. The second part (i.e., 'd')
#     shows that this frequency is defined in a 'Daily' frequency.

mi_new <- as.frequency("20231101:3", "mi|i:wed-sat")

# Don't make the following mistakes:

mi_invalid <- try(as.frequency("20231101:3", "mi|j:wed-sat"))
#   invalid format in day-based frequency
mi_invalid <- try(f.minutely(f.daily(c(2023,5,16)),2000)) # invalid minute



[Package tdata version 0.3.0 Index]