Skip to contents

Is it a Roman numeral?

Usage

is_roman(x)

Arguments

x

A character vector.

Value

Logical vector; TRUE for a well-formed uppercase Roman numeral.

Examples

is_roman(c("XIV", "MMXXIV", "IIII", "", NA))
#> [1]  TRUE  TRUE FALSE FALSE    NA