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

Vladimir Dergachev vdergachev at rcgardis.com
Thu Jul 5 20:16:09 CEST 2007


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



More information about the R-devel mailing list