[R] Issues with loading csv file

Michael Dewey lists at dewey.myzen.co.uk
Mon May 25 17:39:09 CEST 2015

You could try list.files() which will tell you which files R thinks are 
in your working directory.

On 25/05/2015 13:19, Shivi82 wrote:
> HI All,
> I am trying to load an CSV file into the R project. the code for the same
> is:
> mydata<- read.csv("Jan-May Data.csv", header=TRUE)
> however with this I am getting the below error message:
> /*Error in file(file, "rt") : cannot open the connection
> In addition: Warning message:
> In file(file, "rt") :
>    cannot open file 'Jan-May Data.csv': No such file or directory*/
> I am under the impression that R automatically pulls the data from the
> working directory and we do not have to add the location where the file is
> saved. Please let me know if my understanding is correct and help on the
> error as well.
> Please note the csv file is already saved in the WD.
> Thank you, Shivi
> --
> View this message in context: http://r.789695.n4.nabble.com/Issues-with-loading-csv-file-tp4707637.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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