From gbonafe at arpa.emr.it  Fri Oct 21 15:08:12 2005
From: gbonafe at arpa.emr.it (gbonafe@arpa.emr.it)
Date: Fri, 21 Oct 2005 15:08:12 +0200 (CEST)
Subject: [Rd] read.fwf(...,header=TRUE,...) (PR#8236)
Message-ID: <20051021130812.91B731C716@slim.kubism.ku.dk>

Full_Name: Giovanni Bonafe'
Version: 2.2.0
OS: Linux
Submission from: (NULL) (195.62.164.225)


If the file "example.dat" is like this:

aaa bbb ccc
3.4 1.2 5.6
4.6 10  32
667 343 1.7

With the older 1.9.1, as expected:

> data<-read.fwf(file = "example.dat",widths=c(3,4,4),header=TRUE)
> data
    aaa   bbb  ccc
1   3.4   1.2  5.6
2   4.6  10.0 32.0
3 667.0 343.0  1.7

While with the newer 2.2.0:

> data<-read.fwf(file = "example.dat",widths=c(3,4,4),header=TRUE)
> data
   X3.4 X1.2 X5.6
1   4.6   10 32.0
2 667.0  343  1.7

On the other side, if I use the option header=FALSE, no difference occurs
between the two versions:

> data<-read.fwf(file = "example.dat",widths=c(3,4,4))
> data
   V1   V2   V3
1 aaa  bbb  ccc
2 3.4  1.2  5.6
3 4.6  10    32
4 667  343  1.7



[Rd] read.fwf(...,header=TRUE,...) (PR#8236)
gbonafe@arpa.emr.it