[R] Please help: cannot import files from Windows into R
Duncan Murdoch
murdoch.duncan at gmail.com
Fri Jul 15 02:32:52 CEST 2016
On 14/07/2016 6:49 PM, Christa Rose wrote:
> Can someone please help? The read.table command is not working for me I
> think because Windows has my account name stored as "Christa Rose" with a
> space in it. Is this a problem? I have tried many syntax iterations, and
> cannot get around this.
I don't think that is the problem. The error message
>
> Here is an example of the syntax I've used:
>> RanMinePlay<-read.table("c:\\Users\\Christa
> Rose\\Desktop\\Ran_mine_play_data.txt",header=T)
> And returned error messages:
> in read.table("c:\\Users\\Christa Rose\\Desktop\\Ran_mine_play_data.txt",
> :
> empty beginning of file
indicates that it found the file, but is confused by the content of it.
> In addition: Warning messages:
> 1: In read.table("c:\\Users\\Christa
> Rose\\Desktop\\Ran_mine_play_data.txt", :
> line 1 appears to contain embedded nulls
This warning suggests that the file is not really a plain text file, but
is some binary format, e.g. a file produced by Word or similar.
> 2: In read.table("c:\\Users\\Christa
> Rose\\Desktop\\Ran_mine_play_data.txt", :
> incomplete final line found by readTableHeader on 'c:\Users\Christa
> Rose\Desktop\Ran_mine_play_data.txt
>
> Can someone help me resolve this??
How did you produce the file Ran_mine_play_data.txt? If you saved it
from Word, you need to tell it to save in plain Ascii format. I don't
have a copy of Word to look at, so I can't tell you how that is
described, but it is probably something like "Text (.txt)".
Duncan Murdoch
More information about the R-help
mailing list