Skip to content

Import help (neophyte)

5 messages · Stratford, Jeffrey, Thomas Lumley, Roger Bivand +1 more

#
Hi, I have no experience with R and I'm finding the manuals a bit obtuse
and written as if I already understood R.  

I'm trying to import a csv file from a floppy and it's not working. The
code I'm using is 

read.table("F:\GEORGIA\species_richness\SR_use.csv", sep=",", header =
TRUE, row.names = 1) 

I'm assuming that this command is case sensitive so everything matches. 
 Is there something I'm missing?  

Thanks,

Jeff 


****************************************
Jeffrey A. Stratford, Ph.D.
Postdoctoral Associate
331 Funchess Hall
Department of Biological Sciences
Auburn University
Auburn, AL 36849
334-329-9198
FAX 334-844-9234
http://www.auburn.edu/~stratja
#
On Mon, 31 Oct 2005, Jeffrey Stratford wrote:

            
Yes. Your file path should be 
specified as "F:/GEORGIA/species_richness/SR_use.csv"
[or "F:\\GEORGIA\\species_richness\\SR_use.csv"]

 	-thomas
#
On Mon, 31 Oct 2005, Jeffrey Stratford wrote:

            
PLEASE do read the posting guide! Without the error message you are 
seeing, help isn't possible (we can't see your screen, if we could, you 
should worry!). On Windows try to replace the file name with 
file.choose(), which will help you navigate to the file, but maybe that 
isn't your problem - without seeing the error message, we're none the 
wiser.

  
    
#
On Mon, 31 Oct 2005, Jeffrey Stratford wrote:

            
Further to my previous answer, also review R Windows FAQ 2.16, most likely 
your problem.

  
    
#
On 10/31/2005 1:31 PM, Jeffrey Stratford wrote:
In R (as in C) the backslash is an escape character.  To have a 
backslash appear in your pathname, you need to double it.

Alternatively, just use a forward slash:

  read.table("F:/GEORGIA/species_richness/SR_use.csv", sep=",", header =
  TRUE, row.names = 1)

Duncan Murdoch