Skip to content
Prev 17789 / 63421 Next

bug in gsub with perl=TRUE (PR#8164)

Full_Name: Richard Mott
Version: 2.0.1
OS: Linux toad 2.6.9 #4 SMP Mon Feb 21 16:20:16 GMT 2005 x86_64 AMD Opteron(tm) Processor 848 AuthenticAMD GNU/Linux
Submission from: (NULL) (129.67.46.247)


gsub with perl=TRUE does not work properly. It pads/truncates the resulting
string to
the length of the input string: 

my.formula <- "log10(Biochem.ALP)^2+1 ~ Family + GENDER"
[1] "transformed.y ~ Family + GENDER"
[1] "transformed.y ~ Family + GENDER\0\006\0\0\r\377\0\0\0"  # padded

 my.formula <- "Biochem.ALP ~ Family + GENDER"
[1] "transformed.y ~ Family + GEND"  # truncated
[1] "transformed.y ~ Family + GENDER"