[R] 2.7.0 breaks read.table
Ido M. Tamir
tamir at imp.ac.at
Mon Jun 30 17:41:09 CEST 2008
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)"
More information about the R-help
mailing list