From tlumley at u.washington.edu  Fri May 23 09:46:35 2003
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Fri May 23 17:46:52 2003
Subject: [Rd] grep, gsub, sub have problems with NA values (PR#3078)
In-Reply-To: <200305222032.h4MKWD2b017261@pubhealth.ku.dk>
Message-ID: <Pine.A41.4.44.0305230841310.17962-100000@homer26.u.washington.edu>

On Thu, 22 May 2003 gregory_r_warnes@groton.pfizer.com wrote:

>
> In a string context, grep, gsub, sub are improperly treating NA (missing) as
> the string "NA", and returning unexpected results
>

as were chartr, abbreviate, substr, substring, strsplit. Fixed in r-devel,
for the case of NA in the `main' string. Haven't yet decided what to do
about
  grep(as.character(NA), x)
or
  substr(x,1,2)<-as.charcter(NA)



	-thomas


[Rd] grep, gsub, sub have problems with NA values (PR#3078)
Thomas Lumley