emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: [babel] R - variable names in summary


From: Austin Frank
Subject: [Orgmode] Re: [babel] R - variable names in summary
Date: Wed, 09 Dec 2009 15:49:52 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (darwin)

On Wed, Dec 09 2009, Dan Davison wrote:

> Graham Smith <address@hidden> 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

Attachment: pgpUBhm0cPOev.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]