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.
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 anNAand a warning message. See the example below,The expected behavior is that
2022,2020would 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.