pasting "\" into character strings
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