Skip to contents

Validate RARC Codes

Usage

is_rarc_code(x)

Arguments

x

<chr> vector of RARC adjustment codes, a two-to-three character alphanumeric string.

Value

a tibble

Examples

x <- c("- 253", "OA-23", "PI-", "-45 ",
       "OA23", "MA109", "N9", "N722")

is_rarc_code(x)
#> [1] FALSE FALSE FALSE FALSE FALSE  TRUE  TRUE  TRUE

x[which(is_rarc_code(x))]
#> [1] "MA109" "N9"    "N722"