You can just use `gsub('_', '-')` here; literal strings are an acceptable "match" input.