emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Neuwirth Erich <erich.neuwirth@univie.ac.at>
To: "emacs-orgmode@gnu.org emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: LaTeX table formatting
Date: Tue, 28 Aug 2012 20:10:47 +0200	[thread overview]
Message-ID: <FF11A7E0-935C-45CB-AA2E-359096832D31@univie.ac.at> (raw)

I would like to add some twists to tables.
Using the ATTR_LaTeX attribute I can control
alignment and vertical gridlines in the table.
I also would like to have horizontal gridlines,
and I would like to have multicol top headers.
tgroupt and n.tgroup in theory should me give these multicol headers,
but it does not work.

Is there a way of accomplishing what I want?




#+title: Testing R table output
#+author: Erich Neuwirth
#+date: 28. August 2012

#+ATTR_LaTeX: align=|l|c|r|r|r|r|
#+ATTR_HTML: border="2" rules="all" frame="border"
#+begin_src R :session *RPisa* :results output org :exports results
require(ascii)
mydf <- data.frame(
            year   = rep(as.character(rep(seq(2000,2009,3)),each=2)),
            gender = rep(c("f","m"),times=2),
            m1     = (11:18)/11,
            m2     = (102:109)/22,
            s1     = seq(1,2,length.out=8),
            s2     = seq(1.5,2.5,length.out=8)
   )

res <- ascii(mydf,
             digits=c(0,0,1,1,2,2),
             align=c("l","c","r","r","r","r"),
             format=c("d","s","f","f","f","f"),
             include.rownames=FALSE,
             tgroup=c("","mean","se"),
             n.tgroup=c(2,2,2))

print(res,type="org")
#+end_src

             reply	other threads:[~2012-08-28 18:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 18:10 Neuwirth Erich [this message]
2012-08-28 19:03 ` LaTeX table formatting John Hendy

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=FF11A7E0-935C-45CB-AA2E-359096832D31@univie.ac.at \
    --to=erich.neuwirth@univie.ac.at \
    --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).