[R] gsub: replacing a.*a if no occurence of b in .*
Jeffrey Horner
jeff.horner at vanderbilt.edu
Sat Feb 24 18:39:36 CET 2007
Charilaos Skiadas wrote:
> On Feb 24, 2007, at 11:37 AM, Gabor Grothendieck wrote:
>
>> The _question_ assumed that, which is why the answers did too.
>
> Oh yes, I totally agree, the file snippet the OP provided did indeed
> assume that, though nothing in the text of his question did, so I
> wasn't entirely clear whether the actual file that is going to be
> processed has this form or not. So I just wanted to make sure the OP
> is aware of this limitation, in case the actual file is more
> problematic.
>
> But most importantly, I wanted to suggest a reevaluation, if
> possible, of the process that generates these XML's, and perhaps
> fixing that, instead of patching the problem after it has been created.
Also, I wouldn't tolerate R *crashing* in package code on malformed xml
input.
Jeff
--
http://biostat.mc.vanderbilt.edu/JeffreyHorner
More information about the R-help
mailing list