[Rd] [g]sub behaviour with NA (PR#6451)

Thomas Lumley tlumley at u.washington.edu
Thu Jan 22 18:07:39 MET 2004

On Thu, 22 Jan 2004 maechler at stat.math.ethz.ch wrote:

> We could extend sub() / gsub() to coerce its `x' to character,
> then this would work,
> or we should make it give an error because NA is logical, not a
> character.
> The first option would be inline with already allowing logical
> NA for `pattern' in sub/gsub.

I think it would make sense for the regex functions to coerce all these
arguments to character.  I don't see where it could cause any harm


More information about the R-devel mailing list