On Wed, Dec 09 2009, Dan Davison wrote: > Graham Smith writes: >> Next question is is to do with output with things like summary. In R >> if you have lots of variables,the output wraps so it fits on the >> screen. With babel it runs off the edge of the page. is there a quick >> way of getting the output to fit an anticipated a4 pdf output. > > I'd suggest using :results output, and controlling the width of the > output with options(width=whatever) in R. E.g. > > #+begin_src R :session babeltest :colnames t :results output > options(width=80) > summary(cbind(babeltest, babeltest)) > #+end_src I don't know whether this will end up fitting into your setup, but there's an emacs function `ess-execute-screen-options' that does what Dan just suggested on a per-session basis taking the width of the current buffer into account. Even if it doesn't help with org-bable, it makes life in ESS much pleasanter. You can also look at the latex() function in the R package Hmisc and the function xtable() from the R package xtable. For data frames, matrices, and some common summary functions, these functions will create a latex table out of your R object. Maybe Dan can suggest how latex code generated in R could be properly included and typeset in org-babel. HTH, /au -- Austin Frank http://aufrank.net GPG Public Key (D7398C2F): http://aufrank.net/personal.asc