[R] Error in file(file, "rt") : cannot open the connection

From: djhayes <D.J.Hayes_at_liverpool.ac.uk>
Date: Wed, 21 Mar 2012 19:43:34 +0100


Hi there,

I migrated from Windows7 to Ubuntu (11.10) and am trying to get my R back online.
I've switched from Tinn-R to RKWard which seems to work well.

My problem at the moment is that I'm no longer able to read in the data file I was working on before.

> popafr <- read.table(file="~/Documents/My PhD/Modelling/SAS/SAS
datasets/SAS export sets/Final reference curve sets/SAS_for_R AFRO 11jan11.txt",header=T, sep="\t")
Error in file(file, "rt") : cannot open the connection Calls: read.table -> file
In addition: Warning message:
In file(file, "rt") :

   cannot open file '/home/me/Documents/My PhD/Modelling/SAS/SAS datasets/SAS export sets/Final reference curve sets/SAS_for_R AFRO 11jan11.txt': No such file or directory
>

I get the same results with:
>popafr <- read.table(file.choose())
>popafr <- read.table(file="SAS_for_R AFRO 11jan11.txt",header=T, sep="\t")

The file is physically present in both the getwd() and the directory listed above even with the .choose option I receive the same error.

Does this have to do with file permissions? I've tried running sudo su and then starting R in a terminal with the same error.

any help is much appreciated.

Hopefully yours,
Daniel



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 21 Mar 2012 - 19:26:55 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 21 Mar 2012 - 19:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive