[R] help with read.table() function

Romain Francois francoisromain at free.fr
Sun Jan 29 16:52:04 CET 2006


Le 29.01.2006 16:26, oliver wee a écrit :

>hello, I have just started using R for doing a project
>in time series...
>
>unfortunately, I am having trouble using the
>read.table function for use in reading my data set.
>
>This is what I'm getting:
>I inputted:
>data <-
>read.table("D:/Oliver/Professional/Studies/Time Series
>Analysis/spdc2693.data", header = TRUE)
>
>I got:
>Error in file(file, "r") : unable to open connection
>In addition: Warning message:
>cannot open file 'D:/Oliver/Professional/Studies/Time
>Series Analysis/spdc2693.data', reason 'No such file
>or directory'
>
>as I am just a novice programmer, I really would
>appreciate help from you guys. Is there a need to
>setpath in R, like in java or something like that...
>
>I am using the windows version btw. 
>
>I have also tried to put the file in the work
>directory of R, so that I only typed 
>data <- read.table("spdc2693.data", header = TRUE)
>Again, it won't work, with the same error message.
>
>I would appreciate any help. thanks again.
>  
>
Hi, try :

read.table(file.choose(), header=TRUE)

and go to your file.
Also, you can look a ?setwd, ?getwd

Romain

-- 
visit the R Graph Gallery : http://addictedtor.free.fr/graphiques
mixmod 1.7 is released : http://www-math.univ-fcomte.fr/mixmod/index.php
+---------------------------------------------------------------+
| Romain FRANCOIS - http://francoisromain.free.fr               |
| Doctorant INRIA Futurs / EDF                                  |
+---------------------------------------------------------------+




More information about the R-help mailing list