[R] Import help (neophyte)

Duncan Murdoch murdoch at stats.uwo.ca
Mon Oct 31 19:51:10 CET 2005


On 10/31/2005 1:31 PM, Jeffrey Stratford wrote:
> 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?  

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




More information about the R-help mailing list