[ESS] Problem with loading source files under Windows

Richard M. Heiberger rmh at temple.edu
Sun Mar 11 04:08:52 CET 2007


The message that a filename of this form
'c:Documents and SettingsmarcS-sourcemarc.test.R'
can't be found means you used the wrong syntax.

You did something like
'c:\Documents and Settings\marc\S-source\marc.test.R'
and the "\" was interpreted by R as an escape character and therefore
effectively vanished when it was sent to DOS.

On windows there are two options.  I recommend the first since
it is consistent with how R works everywhere.  Use forward slashes "/".
'c:/Documents and Settings/marc/S-source/marc.test.R'
Ecen better is to avoid embedded blanks and use the 8.3
notation, which is usually
'c:/docume~1/marc/S-source/marc.test.R'
You can find the 8.3 name from the MSDOS prompt CMD with dir/x

The other option is to use double backslashes.  The first
backslash escapes the second before sending it to MSDOS
'c:\\Documents and Settings\\marc\\S-source\\marc.test.R'

Rich




More information about the ESS-help mailing list