RE: [R] Reading in a dataset with uneven variable lengths

From: Liaw, Andy <andy_liaw_at_merck.com>
Date: Tue 03 May 2005 - 06:24:29 EST


One possibility is to use read.fwf().

Andy

> From: Owen, Jason
>
> Suppose I have a text file that I want to read into R like the
> following:
>
> X Y
> 649 699
> 657 891
> 714 632
> 849 727
> 721 597
> 791 868
> 874 652
> 405 978
> 733
> 549
> 790
>
> This is a simple example -- I could have a huge file with many
> columns of unequal lengths.
>
> What is the best way to do it? I can't see how a data frame
> can be used. I checked the FAQ and did a web search on the topic
> but I came up empty.
>
> Jason
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue May 03 06:32:09 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:32 EST