emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Austin Frank <austin.frank@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [babel] R - variable names in summary
Date: Wed, 09 Dec 2009 15:49:52 -0500	[thread overview]
Message-ID: <m0aaxrlvnz.fsf@gmail.com> (raw)
In-Reply-To: 87vdggdkob.fsf@stats.ox.ac.uk


[-- Attachment #1.1: Type: text/plain, Size: 1429 bytes --]

On Wed, Dec 09 2009, Dan Davison wrote:

> Graham Smith <myotisone@gmail.com> 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 #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  parent reply	other threads:[~2009-12-09 20:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 23:50 [babel] R - variable names in summary Graham Smith
2009-12-09  4:38 ` Austin Frank
2009-12-09 16:46   ` Graham Smith
2009-12-09 16:38 ` Dan Davison
2009-12-09 17:05   ` Graham Smith
2009-12-09 19:14     ` Dan Davison
2009-12-09 20:33       ` Graham Smith
2009-12-09 20:44         ` Dan Davison
2009-12-09 21:00           ` Graham Smith
2009-12-09 20:51         ` Thomas S. Dye
2009-12-09 21:06           ` Graham Smith
2009-12-09 20:49       ` Austin Frank [this message]
2009-12-09 21:12         ` Graham Smith
2009-12-09 22:28         ` Dan Davison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0aaxrlvnz.fsf@gmail.com \
    --to=austin.frank@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).