I'm trying to replace "\" with "/" or "\\" in R.
fp = "C:\users\jordan\Documents\Computer Science\R\miscData.txt"
replace(fp, "\", "\\")
Output:
> fp = "C:\users\jordan\Documents\Computer Science\R\miscData.txt"
Error: '\u' used without hex digits in character string starting ""C:\u"
Obviously, "\" is an escape character and can't be used this way. Is there a way to avoid the use of "\" as an escape character in R?