
Last chance! 50% off unlimited learning
Sale ends in
as.roman(x)
as.roman
creates objects of class "roman"
which are
internally represented as integers, and have suitable methods for
printing, formatting, subsetting, and coercion to character
.Only numbers between 1 and 3899 have a unique representation as roman numbers.
## First five roman 'numbers'.
(y <- as.roman(1 : 5))
## Middle one.
y[3]
## Current year as a roman number.
(y <- as.roman(format(Sys.Date(), "%Y")))
## 10 years ago ...
y - 10
Run the code above in your browser using DataLab