Skip to content

Misidentifying invalid integer values #140

@rundel

Description

@rundel

I've just run across an edge case where the yaml includes a somewhat ambiguous value which yaml.load() interprets as an integer which then fails to convert into an R integer resulting in an NA and a warning message. See the example below,

yaml = "copyright:
  year: 2022,2020
  statement: ©Copyright; 2022, Charles Teague
  holder: Charles Teague
"

yaml::yaml.load(yaml)

The expected behavior is that 2022,2020 would be interpreted as a string rather than an integer. I'm not sure if this may be related to internationalization and differences in the use of . and , but in that case I would expect to see a double not an integer. Quoting this particular value is an obvious fix but I am interested in a more general solution.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions