[R] inline/Rcpp: Problem with space in path under Windows

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Jul 24 22:55:16 CEST 2011


On Sun, 24 Jul 2011, Richard M. Heiberger wrote:

> All Windows files have an equivalent 8.3 name without spaces.  It may differ
> on different machines
> and countries.   You find them by typing dir/x in the cmd window.

Or by shortPathName() in R.

But that does not help if R itself is generating the name (here I 
guess .Library).  R on Windows used almost always to generate 8.3 (aka 
DOS) names, but since useRs are nowadays confused by them it 
increasingly quotes canonical names.

Spaces in names are not unique to Windows: they are also common on Mac 
OS X (which has no concept of 8.3 names).   The problem (as the rw-FAQ 
points out) is poorly written packages that fail to use quotes in 
shell command lines (including those generated from makefiles).


> In the US English, the equivalences usually are
>
> c:\>cd c:/
> c:\>dir /x Pr*
> Volume in drive C is Windows7_OS
> Volume Serial Number is 1E6B-37CE
> Directory of c:\
> 06/09/2011  02:35 PM    <DIR>          PROGRA~1     Program Files
> 07/20/2011  08:35 PM    <DIR>          PROGRA~2     Program Files (x86)
>               0 File(s)              0 bytes
>               2 Dir(s)  360,981,925,888 bytes free
> c:\>
>
> Now we know that 64-bit R is located (in forward slash notation as used by
> R) at
> c:/Progra~1/R/R-2.13.1/bin/x64/R.exe
>
> Rich
>
>
> On Sun, Jul 24, 2011 at 4:09 AM, Dieter Menne
> <dieter.menne at menne-biomed.de>wrote:
>
>> I am trying to run inline/Rcpp under Windows 64. The RTools are installed
>> on
>> a spaceless path D:\rtools.
>>
>> Inlining pure c-code works perfectly. When I try the sample code for cpp in
>> the cxx Documentation, I get:
>>
>> x86_64-w64-mingw32-g++.exe: C:/Program: No such file or directory
>>
>> The path to the compiler is correct. Obviously there is some problem with
>> the space in C:/Program (Files).
>>
>> Any ideas where to look for the settings that caused the failure?
>>
>> Dieter
>> --------
>>
>> R version 2.13.0 (2011-04-13)
>> Platform: x86_64-pc-mingw32/x64 (64-bit)
>>
>> locale:
>> [1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252
>> [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
>> [5] LC_TIME=German_Germany.1252
>>
>> attached base packages:
>> [1] stats     graphics  grDevices datasets  utils     methods   base
>>
>> other attached packages:
>> [1] Rcpp_0.9.5   inline_0.3.8
>>
>> loaded via a namespace (and not attached):
>> [1] tools_2.13.0
>>>
>>
>> --
>> View this message in context:
>> http://r.789695.n4.nabble.com/inline-Rcpp-Problem-with-space-in-path-under-Windows-tp3689982p3689982.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
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



More information about the R-help mailing list