It seems this is actually not possible because the windows paths are understood by R in such a way that the "\"
escape the next character. Something like: "foo\bar"
is perceived as some characters (foo
) followed by the special \b
character followed by some other, normal characters (ar
).
To transform single "\"
to "/"
you first have to escape them by a backslash which would look like this: "foo\\bar"
, which in the most cases is ridiculous because then you can as well transform the backslashes to slashes manually.
The only thing that may help was this post on StackOverflow giving the code for a function capturing the input into the console directly and then transforming it. So with this you might get a Rfriendly path via copy paste.