Message-ID: <Pine.LNX.4.31.0212220844350.26748-100000@gannet.stats>
Date: 2002-12-22T09:46:02Z
From: Brian Ripley
Subject: pasting "\" into character strings
In-Reply-To: <Pine.SOL.4.20.0212220330580.11477-100000@santiam.dfci.harvard.edu>
On Sun, 22 Dec 2002, Jeff Gentry wrote:
> > write an R function that writes references to Windows files into a text
> > file, where a different Windows programs will later read these references
> > in the standard Windows syntax.
> > Can someone tell me how to create the character string
> > 'c:\work\part1.txt' from the parts, "c:", "work", an "part1.txt"?
>
> I don't have access to a Windows machine right now to test this, but might
> file.path() help here?
It would, but it generates the other Windows standard, using /.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595