[Rd] read.fwf(...,header=TRUE,...) (PR#8236)
ripley@stats.ox.ac.uk
ripley at stats.ox.ac.uk
Fri Oct 21 16:08:56 CEST 2005
This is the same as PR#8226, and is already fixed in R-patched.
Please note the searches you were asked to do before submitting a report.
On Fri, 21 Oct 2005 gbonafe at arpa.emr.it wrote:
> 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
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list