Bug 16779

Summary: as.roman produces all NA values if one value is invalid
Product: R Reporter: Omar Wagih <omarwagih>
Component: Add-onsAssignee: R-core <R-core>
Status: CLOSED FIXED    
Severity: normal CC: maechler
Priority: P5    
Version: R 3.3.*   
Hardware: x86_64/x64/amd64 (64-bit)   
OS: Other   

Description Omar Wagih 2016-03-23 14:33:42 UTC
as.roman(c('1', '2', '3'))

Produces

[1] I   II  III

as.roman(c('1', '2', '3', ''))

Produces

[1] <NA> <NA> <NA> <NA> 
Warning message:
In .roman2numeric(x) : invalid roman numerals: 1 2 3


I'm assuming this is unexpected behaviour and the expected output should be:

[1] I   II  III <NA>
Comment 1 Martin Maechler 2016-03-24 10:36:10 UTC
The source code currently has a 
     ## (hopefully, for the time being) 
comment, i.e., a hidden "FIXME".

I will commit a bug fix which will also contain some new features for as.roman() and the "roman" class probably later today.