[R] Problem importing file in R after switching from windows to Ubuntu

Ista Zahn istazahn at gmail.com
Sat Mar 1 02:32:38 CET 2014


Hi Christian,

I know you've checked many times, but it is very likely that you are
not typing the file name correctly, or that the file is not where you
think it is. Please run these lines and post the output back here:

setwd("~/Documents/DATABASES/Functional_Annotations")
list.files()

Best,
Ista

On Fri, Feb 28, 2014 at 4:47 PM, Christian De Santis
<christian.desantis at stir.ac.uk> wrote:
> Dear R List,
>
> today i have installed Ubuntu as i decided to give this a try after running R in windows was always running out of memory in making my figures. I have copied my working folders into Ubuntu and changed the WD and the \\ into /. I tried to re run the script and it was going all well till i tried to read a csv database into R.
>
> Annot <- read.csv("~/Documents/DATABASES/Functional_Annotations/Salar_2_Annot_light.csv", header = TRUE)
> Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file '/home/cd46/Documents/DATABASES/Functional_Annotations/Salar_2_Annot_light.csv': No such file or directory
>
> The code is right, and i checked it many times. I copied pasted in
>
> setwd("~/Documents/DATABASES/Functional_Annotations")
> and it works fine! The file is there too, i have checked and manually opened it. I know the message is telling me that he can't find the file or the directory but really, they are there and they are right (i think).
>
> Can someone give me some suggestions? What could i try? Or even better maybe you have a solution.
>
> Thanks and have a nice weekend.
> Christian
>
> --
> The University of Stirling has been ranked in the top 12 of UK universities for graduate employment*.
> 94% of our 2012 graduates were in work and/or further study within six months of graduation.
> *The Telegraph
> The University of Stirling is a charity registered in Scotland, number SC 011159.
>
> ______________________________________________
> 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.



More information about the R-help mailing list