[ESS] Viewing data frames

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Tue Mar 1 14:39:50 CET 2011


> (defun my-rdired-View (objname)
>   "View an object in its own buffer.
> Similar to `ess-rdired-View', but my taste."
>   (interactive "sEnter object name: ")
>   (ess-command "tmpwidth <- options('width')[[1]]\n")
>   (ess-command "options(width=9999)\n")
>   (ess-execute objname nil (concat "R view " objname ))
>   (ess-command "options(width=tmpwidth)\n")
>   (switch-to-buffer (concat "*R view " objname "*"))
>   (toggle-truncate-lines 1))
> 
> It temporarily sets options(width=9999) and in the R view buffer
> calls toggle-truncate-lines. This makes the lines be long so that you
> need to scroll horizontally, but have no breaks. This seems to
> perfectly meet my request.
Nice!  For the 'archives', if you think it useful, would you mind making
a note on the emacswiki about your extension.

  http://www.emacswiki.org/emacs/EmacsSpeaksStatistics

> One little piece is missing: is there a way to have the new buffer
> created by ess-execute in the upper window if I have two windows
> (regardless of where the point is)?

I'm not sure, but take a look in the Elisp documentation, sec 28:

28 Windows
**********

This chapter describes most of the functions and variables related to
Emacs windows.  *Note Frames and Windows::, for how windows relate to
frames.  *Note Display::, for information on how text is displayed in
windows.


...


Stephen



More information about the ESS-help mailing list