[R] Help with gsub function
Ivan Krylov
kry|ov@r00t @end|ng |rom gm@||@com
Fri Mar 15 20:49:02 CET 2019
On Fri, 15 Mar 2019 19:45:27 +0000
Bill Poling <Bill.Poling using zelis.com> wrote:
Hello Bill,
> tb2a$TID2 <- gsub(tb2a$TID, pattern="-[0-0]{0,7}", replacement = "")
Is the pattern supposed to mean something besides the "-" you want to
remove? For the problem you describe, pattern="-" should be enough. It
should locate all hyphens in the string and replace them with empty
strings, i.e. remove them.
--
Best regards,
Ivan
More information about the R-help
mailing list