Related: Convert roman numerals to numbers in R
In the above question, an answer states that there is a function utils:::.roman2numeric() to convert roman to numeric. I also found out that there is a similar function to convert numeric to roman: utils:::.numeric2roman(). Unfortunately it does not work for some numbers, why?
E.g. 3978, 3985 produces NA
This is similar to how as.roman() doesn't work for some roman numbers converting to numerics. E.g. MMMCMXI gives NA instead of 3911.
Is there another function that works for numeric to roman 100% of the time? (Best if it's builtin)
Bonus: another function that works, other than utils:::.roman2numeric(), for roman to numeric. (as.roman() does not work as explained earlier).