From tlumley at u.washington.edu  Thu Jan 22 18:07:39 2004
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Thu Jan 22 18:08:07 2004
Subject: [Rd] [g]sub behaviour with NA (PR#6451)
In-Reply-To: <20040122165155.4C3F51056E@slim.kubism.ku.dk>
References: <20040122165155.4C3F51056E@slim.kubism.ku.dk>
Message-ID: <Pine.A41.4.58.0401220906160.12616@homer33.u.washington.edu>

On Thu, 22 Jan 2004 maechler@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

	-thomas


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