Bug 16779 - as.roman produces all NA values if one value is invalid
Summary: as.roman produces all NA values if one value is invalid
Status: CLOSED FIXED
Alias: None
Product: R
Classification: Unclassified
Component: Add-ons (show other bugs)
Version: R 3.3.0
Hardware: x86_64/x64/amd64 (64-bit) Other
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2016-03-23 14:33 UTC by Omar Wagih
Modified: 2016-03-25 20:17 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.