Re: [Rd] data messed up by read.table ? (PR#9779)

From: Vladimir Dergachev <vdergachev_at_rcgardis.com>
Date: Thu, 05 Jul 2007 14:16:09 -0400

On Thursday 05 July 2007 7:00:46 am 100700.3013_at_compuserve.com wrote:
> Full_Name: Joerg Rauh
> Version: 2.5.0
> OS: Windows 2000
> Submission from: (NULL) (84.168.226.163)
>
>
> Following Michael J. Crawley "Statistical Computing" on page 9 the
> worms.txt is required. After downloading it from the book's supporting
> website, which is http://www.bio.ic.ac.uk/research/mjcraw/statcomp/data/ I
> visually check the data against the book and they look identical. Then I do
> a read.table as suggested:
> worms<-read.table("C:/Programme/R/R-2.5.0/Data/Worms.txt", header = T).
>

I see the same effect on 2.5.0 and 2.5.1 running on Linux.

However, the following line reads the data correctly:

read.table('worms.txt', header=TRUE, quote="\"")

Thus the problem is likely because of single quotes in the Field.Name column, perhaps a single quote character was added to the list of defaults since the book was released.

                     best

                         Vladimir Dergachev

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 05 Jul 2007 - 18:51:10 GMT

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 05 Jul 2007 - 19:35:57 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.