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? -- View this message in context: http://www.nabble.com/txt-file%2C-14000%2B-rows%2C-only-last-8000-appear-tp17701519p17701519.html Sent from the R help mailing list archive at Nabble.com.
On Fri, Jun 6, 2008 at 10:30 PM, RobertsLRRI <raymond.roberts at ncf.edu> 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? > -- > View this message in context: http://www.nabble.com/txt-file%2C-14000%2B-rows%2C-only-last-8000-appear-tp17701519p17701519.htmlDoes nrow(your_data.frame) return the correct number of rows? If so, R read all lines. Paul
On Fri, 6 Jun 2008, 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?You are asked to follow the posting guide and to provide "commented, minimal, self-contained, reproducible code". It is hard to guess what you actually did and to provide advice if you do not do this. The best I can suggest is that you review 2.1 Variations on read.table in R Data Import/Export and be sure to attend to the sections on quoting and commments, which issues often give rise to problems such as you allude to. HTH, Chuck> -- > View this message in context: http://www.nabble.com/txt-file%2C-14000%2B-rows%2C-only-last-8000-appear-tp17701519p17701519.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >Charles C. Berry (858) 534-2098 Dept of Family/Preventive Medicine E mailto:cberry at tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
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