err_tdy_month: Check and tidy numeric or character vector of months

Description Usage Arguments Examples

View source: R/err_tdy.R

Description

Convert a numeric or character vector of month indices or codes to an integer vector. The vector can contain NAs.

Usage

1

Arguments

x

A numeric or character vector.

name

The name for x that will be used in error messages.

Examples

1
2
3
4
5
6
7
8
err_tdy_month(x = c(1, NA, 12, 5),
              name = "x")
err_tdy_month(x = c("01", NA, "12", "05"),
              name = "x")
err_tdy_month(x = c("Jan", NA, "Dec", "May"),
              name = "x")
err_tdy_month(x = c("January", NA, "December", "May"),
              name = "x")

johnrbryant/demcheck documentation built on Dec. 31, 2021, 11:57 a.m.