[R] txt file, 14000+ rows, only last 8000 appear

Philipp Pagel p.pagel at wzw.tum.de
Sun Jun 8 15:04:00 CEST 2008


On Fri, Jun 06, 2008 at 02:30:56PM -0700, RobertsLRRI wrote:
> when I load my data file in txt format into the R workstation I lose about
> 6000 rows, this is a problem. Is there a limit to the display capabilities
> for the workstation?  is all the information there and I just can't see the
> first couple thousand rows?

There are many possiblities. Yes, there can be a limit of what R will
diplay to you. E.g. when I load a large data frame and have R print it
to the screen I get :

> foo <- read.table('some-large-table')
> foo
[... lots of row here ...]
1780                11019                 7519  -0.242   -0.158   -50         0        0
1781                13729                 7371  -0.255   -0.296   -50         0        0
1782               117208                68035   8.000    3.027     0         0        0
1783                10646                12121  -0.892    0.008   -50         0        0
1784                13100                12342  -0.560   -0.051   -50         0        0
1785                13772                11613   0.086    0.742     0         0        0
 [ reached getOption("max.print") -- omitted 4936 rows ]]

but the data is all there:

> dim(foo)
[1] 6721   56

So the first thing you need to do is figure out if R is reading all data
or not.  In case you find that you really end up with too few rows, I'd
have a look at the 'quote' option of read.table (assuming that's how you
read the file).

In order to give better advice, we'd need to know what you did and why
you think not all data is there.

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