Re: [R] reading "special" text files

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Wed 24 Aug 2005 - 19:53:52 EST

Jan Wiener wrote:

> hello,
>
> assume you have a txt-file (sep="\t" or "") looking as follows that you
> want to read into a variable:
>
> 1 1 2 3

> 2 1 2 3 4
> 3 1 5 6 7 8
>
> the result should look like this (e.g., in a data.frame):
>
> 1 1 2 3
> 2 1 2 3 4
> 3 1 5 6 7 8
>
> is there any way to do so?

Yes, with e.g. sep="\t" and sep=" " the number of separators is taken into account.
No, with sep="" the separator is *any* white space.

Uwe Ligges

> thanks in advance,
> jan
>
> ______________________________________________
> 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 Wed Aug 24 19:57:54 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:48:34 EST