[R] A question about default output on the screen

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri May 14 17:48:44 CEST 2004


But R does not call show() to print, it calls print() unless you have an
object with a formal class.  You can try setting a new data.frame method
for print, but an S3 method, please.

On Fri, 14 May 2004, Song Baiyi wrote:

> I got a problem to change the default output on the screen and I use 
> Xemacs ESS and R.
> 
> When I happen to show a data.frame with thousands of records (type a 
> variable name and return), the screen just freeze or keep scrolling for 
> minutes, because of the large quantity of records.
> 
> Therefore I decide to write a more clever "show" method, which will 
> check the number of items to print on the screen. If there are too many 
> records, it will just prompt a warning message and return. How can I do 
> it? I tried it setMethod("show","ANY", 
> function(object){....;standerdGenetic("show");}), but it did not work.
> 
> Can anyone give me some ideas?

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list