How can someone remove this expressions – ( in gsub
Command:
gsub("– (", "", df$Names)
Error:
Error: '\(' is an unrecognized escape in character string starting ""\("
You need to escape the parenthesis character ( with a double backslash - one for gsub and one for R:
gsub("– \\(", "", df$Names)