Re: [Bioc-devel] Use DataFrame's printing format for data.frames

2012-11-17 Thread Ryan C. Thompson
Actually, my previous post had a small bug in it: it would throw an error when printing a zero-column data frame. The following code fixes this: print.data.frame <- function(df) { if (ncol(df) > 0 && require("IRanges")) { prev.max.print <- getOption("max.print") on.exit(options(max.pri

[Bioc-devel] Use DataFrame's printing format for data.frames

2012-11-17 Thread Ryan C. Thompson
Hi all, I noticed that DataFrame objects have a much faster and more practical printing format than base R's data.frame class. So I wrote a replacement for "print.data.frame" that prints data.frames in the same style as DataFrames. Just stick it in your ~/.Rprofile and your data.frames will m