[R] Question concerning directory/path names

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Mar 1 18:08:29 CET 2013


On 01/03/2013 15:49, Adams, Jean wrote:
> I do not use these functions myself.  But, why don't you do a little test
> on some paths that you can control.  Put the same files in directories with
> and without spaces and see if you can get the functions to work.

In the case of RODBC, it never uses file names so this is an issue for 
the ODBC drivers but mine work with spaces in path names.

I believe gdata uses Perl and fails to quote arguments it passes on.

>
> Jean
>
>
> On Thu, Feb 28, 2013 at 2:54 PM, Lane, Michael <mflane at odu.edu> wrote:
>
>> This seems like a very basic question so I have searched the FAQ site,
>> several manuals, and the R-Seek site as well as Googling for an answer but
>> can't seem to come up with one. I am trying to import an Excel file that
>> resides on a University network.  The path name of the file is to a network
>> drive and includes blank spaces (e.g. K:/science/next directory
>> science2/mydata/). The setwd() works and I am able to actually see the
>> files in the directory on the network but for some reason the RODBC, GDATA
>> and  XlsReadWrite functions do not seem to be able to find the files.  Does
>> anyone know if these functions able to read path names with blank spaces?
>> The available documentation doesn't seem to indicate one way or another.
>> Note that I can't change the path name because they are setup by University
>> network administrators.   Obviously it may be some sort of syntax error
>> with my coding of the functions (I'm in the process of learning R) but I am
>> not going to ask for help with that a!
>>   nd I would like to eliminate the possibility that it is simply the path
>> names. I have not tried conversion to .csv and then importing which I would
>> prefer not to do. Thanks in advance for any help.

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