I am trying to read in some data that is is a text file that looks like this:
2009-08-09 - 2009-08-15 0 2 0
2009-08-16 - 2009-08-22 0 1 0
2009-08-23
The file you are reading is probably using some encoding other than ASCII.
?read.table
shows
read.table(file, header = FALSE, sep = "", quote = "\"'",
...
fileEncoding = "", encoding = "unknown")
fileEncoding: character string: if non-empty declares the encoding used
on a file (not a connection) so the character data can be
re-encoded. See 'file'.
So perhaps try setting the fileEncoding
parameter. If you don't know the encoding, perhaps try "utf-8" or "cp-1252". If that does not work, then if you pastebin a snippet of your actual file, we may be able to identify the encoding.