get.seq0 | R Documentation |
Use this function to generate a list of character strings, where each element is a string representation of a frequency within the specified range.
get.seq0(start, length, by = 1)
start |
The first frequency of the sequence. |
length |
The length of the sequence. |
by |
An integer that determines the increment of the sequence. |
A list of character strings that represents the sequence.
get.seq
start <- f.monthly(2020,1)
sequence1 <- get.seq0(start, 24, 1) # this will be '2020M1', '2020M2', ..., '2021M12'
sequence2 <- get.seq0(start, 24, 2) # this will be '2020M1', '2020M3', ..., '2023M11'
sequence3 <- get.seq0(start, 24, 3) # this will be '2020M1', '2020M4', ..., '2025M10'
# backward:
sequence4 <- get.seq0(start, 24, -1) # this will be '2020M1', '2019M12', ..., '2018M2'
# Lists are a little different:
start_l <- f.list.string(c("A","B","C","D"), "C")
sequence5 <- get.seq0(start_l, 5, 1) # this will be 'C', 'D', 'out_item:1', ..., 'out_item:3'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.