Learn R Programming

mongolstats (version 0.1.1)

nso_period_seq: Create period codes

Description

Utilities to construct NSO period codes and sequences. For monthly data, use YYYYMM; for yearly, use YYYY.

Usage

nso_period_seq(start, end, by = c("Y", "M"))

Value

Character vector of period codes.

Arguments

start, end

Start and end periods as character (YYYY or YYYYMM).

by

'Y' for yearly or 'M' for monthly.

Examples

Run this code
# Generate yearly sequence
nso_period_seq("2020", "2024", by = "Y")

# Generate monthly sequence
nso_period_seq("202401", "202406", by = "M")

Run the code above in your browser using DataLab