se0 <- f.secondly(f.daily(c(2023,5,16)),40032)
se0_value_str <- as.character(se0) # this will be '20230516:40032'.
se0_class_str <- get.class.id(se0)
# this will be 'se|d'. The second part (i.e., 'd') shows
# that this frequency is defined in a 'Daily' frequency.
se_new <- as.frequency("20231101:3", "se|i:wed-sat")
# Don't make the following mistakes:
# \donttest{
mi_invalid <- try(as.frequency("20231101:3", "se|j:wed-sat"))
# invalid format in day-based frequency
mi_invalid <- try(f.secondly(f.daily(c(2023,5,16)),100000)) # invalid second
# }
Run the code above in your browser using DataLab