roman                 package:utils                 R Documentation

_R_o_m_a_n _N_u_m_e_r_a_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     Manipulate integers as roman numerals.

_U_s_a_g_e:

     as.roman(x)

_A_r_g_u_m_e_n_t_s:

       x: a numeric vector, or a character vector of arabic or roman
          numerals.

_D_e_t_a_i_l_s:

     '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.

_R_e_f_e_r_e_n_c_e_s:

     Wikipedia contributors (2006). Roman numerals. Wikipedia, The Free
     Encyclopedia. <URL:
     http://en.wikipedia.org/w/index.php?title=Roman_numerals&oldid=78252134>.
     Accessed September 29, 2006.

_E_x_a_m_p_l_e_s:

     ## 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

