Help with gsub function
On Fri, 15 Mar 2019 19:45:27 +0000
Bill Poling <Bill.Poling at 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