How can I join / concatenate UNC path components in R in a OS agnostic way?
I've found this answer on joining local paths using file.path()
, but it seemingly doesn't work on UNC paths.
How can I join / concatenate UNC path components in R in a OS agnostic way?
I've found this answer on joining local paths using file.path()
, but it seemingly doesn't work on UNC paths.
Your UNC Adress might contain \
. R really hates those. If your UNC paths are shown to you as network drive use net use
in the commandline (on Windows type cmd in start). There you'll find the remote adress. Then add one \
in front of every \
:
like this:
\\mydomain.adress.drive\projects
to
\\\\mydomain.adress.drive\\projects
This happens because R handles \
as marker for escape characters. like \n
for new line.