I have a problem doing substitution using sub and perl=TRUE when the elements of x have fewer characters than the replacement string. Let me show you what I mean:
> sub("m","billy","m") [1] "billy" But using perl=TRUE, I can only return a result as long as my x: > sub("m","billy","m",perl=TRUE) [1] "b" > sub("m","billy","ma",perl=TRUE) [1] "bi" Etc. Is this supposed to happen like this? I couldn't see a mention of this requirement in the help. I am using R 2.0.1 on windows xp. Robert ************************************************************************ The information in this e-mail together with any attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any form of review, disclosure, modification, distribution and/or publication of this e-mail message is prohibited. If you have received this message in error, you are asked to inform the sender as quickly as possible and delete this message and any copies of this message from your computer and/or your computer system network. ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html