Skip to content
Back to formatted view

Raw Message

Message-ID: <3BAF86DD.52402AE3@statistik.uni-dortmund.de>
Date: 2001-09-24T19:17:49Z
From: Uwe Ligges
Subject: Problem with read.table and scan

"Scott, Uriel" wrote:
> 
> The R version is 1.3.1 and the following is an example of the problem:
> 
> > air <- read.table("air.data",header=TRUE)
> Error in file(file, "r") : cannot open file `air.data'

Just specify the location completely, e.g.:
 read.table("c:/my_path_to_the_file/air.data", header=TRUE)

R looks in your current working directory for files without specified
path.
You get the current working directory by
  getwd()

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._