Skip to content

strange read.table results

3 messages · Daniel Alcock, Sarah Goslee

#
My guess is that there's something wrong with your file. You really don't
give us enough information to diagnose the problem, though. An encoding
issue? If you open the file in a plain text editor, what happens? What OS
are you using? Version of R?

When I copy your sample data from the email into a text file, deleting the
blank lines, it opens as expected using read.table() with no additiona
arguments.

Sarah
On Tue, Nov 17, 2009 at 9:43 AM, Daniel Alcock <da2 at sanger.ac.uk> wrote:

  
    
#
Sorry about that, it seems it was a windows encoding problem:

read.table("bfx.txt",fileEncoding="UTF-16");

and it works fine

thanks anyway

Dan

Daniel Alcock
Malaria Genetics (T112)
Wellcome Trust Sanger Institute
Cambridge
CB10 1SA
UK
+44 (0)1223 834244 ext. 4994
"The most exciting phrase to hear in science, the one that heralds new discoveries, is not Eureka! But rather, "hmm.... that's funny...." -- Isaac Asimov


-----Original Message-----
From: Sarah Goslee [mailto:sarah.goslee at gmail.com] 
Sent: 17 November 2009 16:58
To: Daniel Alcock
Cc: r-help at r-project.org
Subject: Re: [R] strange read.table results

My guess is that there's something wrong with your file. You really don't
give us enough information to diagnose the problem, though. An encoding
issue? If you open the file in a plain text editor, what happens? What OS
are you using? Version of R?

When I copy your sample data from the email into a text file, deleting the
blank lines, it opens as expected using read.table() with no additiona
arguments.

Sarah
On Tue, Nov 17, 2009 at 9:43 AM, Daniel Alcock <da2 at sanger.ac.uk> wrote:
-- 
Sarah Goslee
http://www.functionaldiversity.org