Re: how to put a single backslash into a string, to make file paths usable on windows

Chris Ryan <[email protected]> Thu, 7 May 2026 09:18:09 -0400
Newsgroups gmane.comp.lang.r.general
Message-ID <[email protected]>
It had been about a year since I had worked in Windows, and apparently I
had gotten rusty. Forward slashes in path names, as in

read.csv("e:/path/to/datafileOnWindows.csv")

work just fine in R on Windows.

Sorry for the bother.

--Chris Ryan



Chris Ryan wrote:
> I'm trying to generalize one of my scripts so that it will run on my
> Linux Mint computer at home and my client's Windows 11 computer at work.
>  I'm encountering trouble when setting file paths, conditional on which
> computer the script is running on. It's the Windows backslash issue
>