[R] difficulties in reading a .prn file

Philipp Pagel p.pagel at wzw.tum.de
Wed Oct 29 17:48:56 CET 2008


On Wed, Oct 29, 2008 at 06:19:51PM +0200, jass at in.gr wrote:
> I am having problems in reading appropriately a huge .prn file of almost
> 450.000 rows and 29 columns.  The variables are consisted of characters,
> dates, time, numeric values.  I use read.table("file.prn", header=F,
> sep="\t", na.strings="*"), where the missing values are declared as "*".  The
> R engine is reading it like it, but when I am asking for the dimensions of
> the data frame I get the right number of rows but only 1 column...
> dim(file)
> [1] 422344      1

The most likely explanation is that your file is not tab separated.

> And what is going on with the "*"? Is there any suggestion for this as well???

That should work fine as soon as you figure out the correct value for sep.

BTW: your outpu looks like you want to use header=T.

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://mips.gsf.de/staff/pagel



More information about the R-help mailing list