Skip to content
Back to formatted view

Raw Message

Message-ID: <430C43B0.5090905@statistik.uni-dortmund.de>
Date: 2005-08-24T09:53:52Z
From: Uwe Ligges
Subject: reading "special" text files
In-Reply-To: <430C345F.1050406@tuebingen.mpg.de>

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 at 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