f.minutely | R Documentation |
Minute-ly
FrequencyUse this function to create a frequency for time-series data that occurs every minute in a day or a subset of a week.
f.minutely(day, minute)
day |
A 'Day-based' object of class |
minute |
The index of the minute in the day, which should be between 1 and 1440. |
In order to use the as.frequency
function for this type of frequency,
you need the following information:
Character Format: "YYYYMMDD:#"
(where # represents the value of minute
)
Class Id: mi|...
(where '...' represents the 'class id' of day
)
An object of class ldtf
. It is also a list with the following members:
class |
Determines the class of this frequency. |
day |
Determines the |
minute |
Determines the |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.