I am trying to read a csv file using the code; contol <- read.csv("RBS.csv") This is the error message I got; Error in file(file, "r") : unable to open connection In addition: Warning message: In file(file, "r") : cannot open file 'RBS.csv', reason 'No such file or directory' Where was the mistake? -- OYEYEMI, Gafar Matanmi (Ph.D) Senior Lecturer Department of Statistics University of Ilorin. Area of Specialization: Multivariate Analysis, Statistical Quality Control & Total Quality Management. Tel: +2348052278655, +2348068241885 [[alternative HTML version deleted]]
Make sure you have the correct path to the file. On Apr 19, 2013 10:53 AM, "Gafar Matanmi Oyeyemi" <gmoyeyemi@gmail.com> wrote:> I am trying to read a csv file using the code; > contol <- read.csv("RBS.csv") > This is the error message I got; > Error in file(file, "r") : unable to open connection > In addition: Warning message: > In file(file, "r") : > cannot open file 'RBS.csv', reason 'No such file or directory' > > > Where was the mistake? > > -- > OYEYEMI, Gafar Matanmi (Ph.D) > Senior Lecturer > Department of Statistics > University of Ilorin. > Area of Specialization: Multivariate Analysis, Statistical Quality Control > & Total Quality Management. > Tel: +2348052278655, +2348068241885 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]
Are you sure the file is in your current working directory? Often people simply put the full path such as "/Users/Name/RBS.csv" Cheers, On Fri, Apr 19, 2013 at 9:30 AM, Gafar Matanmi Oyeyemi <gmoyeyemi@gmail.com>wrote:> I am trying to read a csv file using the code; > contol <- read.csv("RBS.csv") > This is the error message I got; > Error in file(file, "r") : unable to open connection > In addition: Warning message: > In file(file, "r") : > cannot open file 'RBS.csv', reason 'No such file or directory' > > > Where was the mistake? > > -- > OYEYEMI, Gafar Matanmi (Ph.D) > Senior Lecturer > Department of Statistics > University of Ilorin. > Area of Specialization: Multivariate Analysis, Statistical Quality Control > & Total Quality Management. > Tel: +2348052278655, +2348068241885 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. >-- Charles Determan Integrated Biosciences PhD Student University of Minnesota [[alternative HTML version deleted]]
Dear Gafar Matanmi Oyeyemi, Re:> I am trying to read a csv file using the code; > contol <- read.csv("RBS.csv") > This is the error message I got; > Error in file(file, "r") : unable to open connection > In addition: Warning message: > In file(file, "r") : > cannot open file 'RBS.csv', reason 'No such file or directory' >I always use "file.choose()" to find the exact path name, e.g. contol <- read.csv(file.choose()) After having found the path name, you can put it in the R source text for future use (provided it remains the same of course). Best wishes, Franklin Bretschneider -- Dept of Biology Kruytgebouw W711 Padualaan 8 3584 CH Utrecht The Netherlands