Typescript Replace Part Of String Concatenation In R