r - Is there a way for Windows to return the path to a directory as Linux does? -
in windows path directory like: c:\users\name
in linux should like: /home/name
in r programming language backslashes escape character, therefore path (even on windows system) must written either c:/users/name or c:\\users\\name. when path long rather tiring retype every slash.
is there anyway in windows returns path double backslashes or 1 slash? if not, there simple way in r change path r can understand it?
thank much.
if running interactively can copy windows path clipboard use:
normalizepath(readclipboard(), "/")
this return unix style path.
example c:\users\john\dropbox
. highlight right click , copy in windows. run:
> normalizepath(readclipboard(), "/", mustwork = false) [1] "c:/users/john/dropbox"
Comments
Post a Comment