get.seq | 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.seq(from, to, by = 1)
from |
The first frequency of the sequence. |
to |
The last frequency of the sequence. |
by |
An integer that determines the increment of the sequence. |
The two arguments from
and to
should be valid frequencies (see the f.?
functions).
They should also be consistent; you cannot create a sequence in which one is, for example, monthly and the other is yearly.
A list of character strings that represents the sequence.
get.seq0
from <- f.monthly(2020,1)
to <- f.monthly(2021,12)
sequence1 <- get.seq(from, to, 1) # this will be '2020M1', '2020M2', ..., '2021M12'
sequence2 <- get.seq(from, to, 2) # this will be '2020M1', '2020M3', ..., '2021M11'
sequence3 <- get.seq(from, to, 3) # this will be '2020M1', '2020M4', ..., '2021M10'
# backward:
sequence4 <- get.seq(to, from, -1) # this will be '2021M12', '2021M11', ..., '2020M1'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.