[R] Printing data frame with million rows

peter dalgaard pdalgd at gmail.com
Sun Aug 7 20:37:42 CEST 2011


On Aug 7, 2011, at 20:27 , David Winsemius wrote:

> 
> On Aug 7, 2011, at 2:08 PM, Bansal, Vikas wrote:
> 
>> Dear all,
>> 
>> I was working on number of files and at the end I got a data frame with approx. million rows.To prin this data frame in output, I used
>> 
>> capture.output(print.data.frame(end,row.names=F), file = "summary", append = FALSE)
>> 
>> where end is the name of my data frame and summary is the name of my output file.
>> 
>> but when I checked the output there were only 10000 rows and at the last it was written-
>> 
>> [ reached getOption("max.print") -- omitted 923750 rows ]]
>> 
>> Can you please tell me what is wrong with my output code?
> 
> Nothing.
> 
>> I want to print all million rows in my output.
> 
> I'm trying to figure out why, after that warning message, you did not immediately pull up the help page for getOption?

Perhaps he was looking for a way to override the option rather than change it?

print(...., max=2e6)

should do the trick. (Documented on help(print.default), which perhaps _is_ a little hard to find your way to.)



> 
> 
> -- 
> 
> David Winsemius, MD
> West Hartford, CT
> 
> ______________________________________________
> 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
"Døden skal tape!" --- Nordahl Grieg



More information about the R-help mailing list