Firstly, I understand that "\" is an R escape character and also the file path separator on windows.
I know that it can be escaped by using either / or \.
I am developing a package and I want a function for the user to literally just be able to call it like:
makeFileLocationRCompatable("H:\Temp")
and for the function to return
"H:/Temp"
or
"H:\\Temp"
but it seems to be impossible in R due to the fact that \ escapes the following character.
I don't want my users to have to change the way they input the file path.
Any ideas?