From todd at baileywick.plus.com  Thu Mar 16 22:28:02 2006
From: todd at baileywick.plus.com (todd@baileywick.plus.com)
Date: Thu, 16 Mar 2006 22:28:02 +0100 (CET)
Subject: [Rd] sub returns garbage (PR#8687)
Message-ID: <20060316212802.D4E51C976@slim.kubism.ku.dk>

Full_Name: Todd Bailey
Version: 2.1
OS: Mac OS-X 10.4.3
Submission from: (NULL) (87.112.79.124)


sub returns garbage in some strings when replacing something with nothing and
fixed=TRUE.  For example:

> a=c('hello','hello'); sub('lo','',a,fixed=TRUE)
[1] "hel"     "hel\0\0"
> a=c('hello','hello'); sub('lo','',a,fixed=FALSE)
[1] "hel" "hel"


> version
         _                        
platform powerpc-apple-darwin7.9.0
arch     powerpc                  
os       darwin7.9.0              
system   powerpc, darwin7.9.0     
status                            
major    2                        
minor    2.1                      
year     2005                     
month    12                       
day      20                       
svn rev  36812                    
language R



[Rd] sub returns garbage (PR#8687)
todd@baileywick.plus.com