Mello Cavallo, Alice
2015-Mar-02 16:53 UTC
[R] Installed R to Windows, but having trouble with read.csv
I copied the file into the bin folder of R ...> perf_data <- read.csv("PerfResultsCSv.csv")Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'PerfResultsCSv.csv': No such file or directory I also installed and load RWeka package, but canot open. It seems like I am having some issue of directories... I am new to R, any help appreciated. Thanks, Alice [[alternative HTML version deleted]]
Omar André Gonzáles Díaz
2015-Mar-02 19:56 UTC
[R] Installed R to Windows, but having trouble with read.csv
Is this file in your working directory? (To know your working directory use: getwd() ) If not, put it in there. 2015-03-02 11:53 GMT-05:00 Mello Cavallo, Alice <melloa at wit.edu>:> I copied the file into the bin folder of R ... > > > > > perf_data <- read.csv("PerfResultsCSv.csv") > Error in file(file, "rt") : cannot open the connection > In addition: Warning message: > In file(file, "rt") : > cannot open file 'PerfResultsCSv.csv': No such file or directory > > I also installed and load RWeka package, but canot open. > > > > It seems like I am having some issue of directories... > > I am new to R, any help appreciated. > > Thanks, > > Alice > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >[[alternative HTML version deleted]]
Duncan Murdoch
2015-Mar-03 00:49 UTC
[R] Installed R to Windows, but having trouble with read.csv
On 02/03/2015 11:53 AM, Mello Cavallo, Alice wrote:> I copied the file into the bin folder of R ... > > > >> perf_data <- read.csv("PerfResultsCSv.csv") > Error in file(file, "rt") : cannot open the connection > In addition: Warning message: > In file(file, "rt") : > cannot open file 'PerfResultsCSv.csv': No such file or directory > > I also installed and load RWeka package, but canot open. > > > > It seems like I am having some issue of directories... > > I am new to R, any help appreciated.Setting the filename using the file.choose() function is usually easiest. I.e. f <- file.choose() perf_data <- read.csv(f) You'll get the usual file choose dialog (at least in Windows and OSX; not sure about Linux) when file.choose() runs and can navigate to the file. The full name including path will be saved in f. Duncan Murdoch