Skip to content

strsplit() and final empty values

1 message · Dzmitry Batrakou

#
Hello,

I would like to suggest changing the behaviour of the strsplit() function
with multiple trailing empty values. Currently, `strsplit(x = 'value::',
split = ':')` produces a list of length 2 ('value',''). This behaviour is
documented in the manual (penultimate example), however, I would argue, is
illogical and can lead to unexpected parsing results. One example is
splitting delimited value strings into a table.

Regards,
Dzmitry