year_iso: year.iso: Transform Two-Digit Years to Four-Digit Years: This...

View source: R/year_iso.R

year_isoR Documentation

year.iso: Transform Two-Digit Years to Four-Digit Years

This function transforms two-digit years (YY) to four-digit years compliant with ISO-8601 (YYYY). It is based on the assumption that two-digit years above a certain boundary year belong to the reference century and years at or below that boundary belong to the following century.

Description

year.iso: Transform Two-Digit Years to Four-Digit Years

This function transforms two-digit years (YY) to four-digit years compliant with ISO-8601 (YYYY). It is based on the assumption that two-digit years above a certain boundary year belong to the reference century and years at or below that boundary belong to the following century.

Usage

year_iso(x, boundary = 50, century = 1900)

Arguments

x

A vector of two-digit years.

boundary

The boundary year. Defaults to 50 (= 1950).

century

The reference century. Defaults to the 1900s (20th century).

Value

A vector of four-digit years.

Examples

year_iso(91)
year_iso(c(13, 45, 36, 57, 68))

SeanFobbe/databuilder documentation built on July 20, 2022, 4:50 a.m.