In S-Plus 6.0 beta 2 (and probably 5.x),
substring(x, c(1,3), c(1,3)) <- 'x'
for example will result in a vector of 2 character strings even if
x is a character string having one element. I think the
proper behavior should be to do multiple replacements within
a single character string, resulting in a one-vector.
Also, has anyone implemented a search/replace/regular expression
function that generalizes regexpr()?
--
Frank E Harrell Jr Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|