[ESS] R object tooltips

Erik Iverson iverson at biostat.wisc.edu
Sun Feb 1 01:58:57 CET 2009


Hello,

I just wrote an elisp function that, when invoked in a .R buffer, will display 
information about the R object in a tooltip.  The information that is displayed 
will depend on what class the object is.  For example, factors will have a table 
displayed, and numeric variables will have the standard summary shown.

I uploaded a video demonstration of the function at 
http://www.youtube.com/watch?v=E_N-RXW2_Xo .

You can find the code for the function and documentation at 
http://www.biostat.wisc.edu/~iverson/ess-R-object-tooltip.el and please note 
that in the comments, it says:

;; IMPORTANT: This function calls tooltip-show-at-point,
;; which will need to be defined as found at
;; http://www.biostat.wisc.edu/~iverson/r-args-tooltip-at-point.el

Also, an improvement would be if the tooltip displayed in a monospace font, 
instead of the proportional default (on my system).  I did not have time to look 
into that, but I assume tooltip faces/fonts can be customized in Emacs.

I have the function bound to C-c C-g in ESS mode.  My original idea was to show 
the tooltip using the mouse whenever it was hovering over a valid R object, and 
almost had that working, but not quite.  The R objects must of course be present 
in the current inferior R process.  I hope this is useful to others for 
interactive data analysis.

Let me know if you can think of any further improvements.

Best,
Erik Iverson




More information about the ESS-help mailing list