SCM

[#6564] Make as.string more permissive in its inputs

View Trackers | Bugs | Download .csv | Monitor

Date:
2018-02-19 19:00
Priority:
3
State:
Open
Submitted by:
Jeffrey Arnold (jrnold)
Assigned to:
Nobody (None)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
None
Resolution:
None
 
URL:
Summary:
Make as.string more permissive in its inputs

Detailed description
The attached patch changes the order of tests in the at.string function so that it will accept objects inheriting from the character class, instead of only accepting bare character vectors. I encountered this problem when trying to use the objects output by the glue() function in the glue package; these are objects which inherit from the character class. However, they wouldn't work with the caption argument in xtable. I couldn't think of any reason why or how accepting anything that would pass is.character() would affect the downstream code (and the patch passes all tests). I would go even further and use as.character() to coerce inputs to character vectors, but the attached patch was the minimal change that I could think of to solve this problem.

Followup

No Followups Have Been Posted

Attached Files:

Attachments:
update-as-string.diff

Changes:

Field Old Value Date By
File Added5164: update-as-string.diff2018-02-19 19:00jrnold
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge