I'm trying to convert the Roman numerals in a string to Arabic.
I tried using stringr::str_sub to select the corresponding characters and use as.numeric(as.roman()) to convert, but it's messier than I thought.
A <- c("Case I", "Big Case II", "Not a Case", "This is Case IV")
I expect the output to be:
"Case 1" "Big Case 2" "Not a Case" "This is Case 4"