[R] Cannot read in a csv file.

From: John Kane <jrkrideau_at_yahoo.ca>
Date: Sat, 07 May 2011 10:26:18 -0700 (PDT)

Can anyone suggest why this file http://www.mediafire.com/?afeyhhpacaq is refusing to open for me.?

I must admit I don't know all its history but the original data was taken from an OOo spreadsheet that I edited (good bit of copying and pasting and the month variable added by hand in OOo Calc) and, then,saved as a csv file. It was not originally an English language file as far as I can determine. It may have been created in Excel for all I know.

If I load the file into my text editor (Tinn-r) I can read the material in using the textConnection command and have no problem working with it. However this meant that I spend an hour and a half trying to read the file and 5 minutes doing the graph I wanted. I'd like to avoid my mistake in the future if possible.

I'm showing my last try below but the directory is almost certainly correct. I've tried it using a full path name and, as below, after changing the active directory.

When I try to load the file I get this:

> read.csv("asp.csv", header=TRUE, sep=",")  

Error in file(file, "rt") : cannot open the connection In addition: Warning message:
In file(file, "rt") : cannot open file 'asp.csv': No such file or directory


R version 2.12.2 (2011-02-25)
Platform: i386-pc-mingw32/i386 (32-bit)

[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252
[3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=English_Canada.1252

attached base packages:
[1] grid stats graphics grDevices utils datasets methods base

other attached packages:
[1] ggplot2_0.8.9 proto_0.3-9.1 reshape_0.8.4 plyr_1.4.1

loaded via a namespace (and not attached):
[1] digest_0.4.2 tools_2.12.2


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 Sat 07 May 2011 - 17:28:53 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 Thu 12 May 2011 - 13:00:05 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