[R] 2.7.0 breaks read.table

From: Ido M. Tamir <tamir_at_imp.ac.at>
Date: Mon, 30 Jun 2008 17:41:09 +0200


Hi,
yes a bold statement, but I get different behaviour from 2.6.2 and 2.7.0 in read.table, and I don't find any documentation in http://cran.r-project.org/src/base/NEWS.

A file like (space delimited):

foo	+	.
bar	-	.

2.7.0:
> tab <- read.table("test.txt",as.is=TRUE) > tab

    V1 V2 V3
1 foom 0 0
2 bar 0 0

while until now and on 2.6.2
> tab <- read.table("test.txt",as.is=TRUE) > tab

    V1 V2 V3
1 foom + .
2 bar - .

the really strange thing I just saw when preparing the simplified test case - I normally use tab delimited files (biological gff files by the way where +/- and . have some meaning).

on 2.7.0:
tab <- read.table("test.txt",sep="\t", as.is=TRUE) > tab

        V1
1 foom + .
2 bar - .

so specifying the wrong separator brings up the old correct behaviour.

best wishes,
ido

PS:
I hope I cancelled the first non-member mailing list post in time - I forgot the system:
> R.Version()
$platform
[1] "x86_64-redhat-linux-gnu"

$arch
[1] "x86_64"

$os
[1] "linux-gnu"

$system
[1] "x86_64, linux-gnu"

$status
[1] ""

$major
[1] "2"

$minor
[1] "7.0"

$year
[1] "2008"

$month
[1] "04"

$day
[1] "22"

$`svn rev`
[1] "45424"

$language
[1] "R"

$version.string
[1] "R version 2.7.0 (2008-04-22)"



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 30 Jun 2008 - 17:03:24 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 Mon 30 Jun 2008 - 18:30:57 GMT.

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

list of date sections of archive