emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Riccardo Romoli <ric.romoli@gmail.com>
To: emacs-orgmode@gnu.org
Subject: org-babel export table from R to LaTeX
Date: Tue, 14 Feb 2012 16:31:32 +0100	[thread overview]
Message-ID: <CAHiM-bO7PNjWMpzt0VQY4Z5F8-p1DXqBfTZA3LhfJmd3JB75kw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]

Hi, I work with org-babel and R.
In the R session I create a table that I have to export to LaTeX.
This is the code I use:

#+headers: :results latex
#+begin_src R :session *R* :exports results
.....
  print(xtable(summary(mypca)))
#+end_src

I do not understand why the exported table is delimited by "|":

|% latex table generated in R 2.14.1 by xtable 1.6-0 package |
| % Tue Feb 14 16:21:48 2012 |
| \begin{table}[ht] |
  | \begin{center} |
    | \begin{tabular}{rrrrrrrrrrrrrrrrr} |
      | \hline |
      | & PC1 & PC2 & PC3 & PC4 & PC5 & PC6 & PC7 & PC8 & PC9 & PC10 &
      PC11 & PC12 & PC13 & PC14 & PC15 & PC16 \\ |
      | \hline |
      | Standard deviation & 3.4693 & 2.8113 & 2.5561 & 2.2668 &
      2.0015 & 1.9236 & 1.7287 & 1.6220 & 1.4288 & 1.3456 & 1.2596 &
      1.2195 & 1.1278 & 1.0778 & 0.8390 & 0.0000 \\ |
      | Proportion of Variance & 0.2188 & 0.1437 & 0.1188 & 0.0934 &
      0.0728 & 0.0673 & 0.0543 & 0.0478 & 0.0371 & 0.0329 & 0.0289 &
      0.0270 & 0.0231 & 0.0211 & 0.0128 & 0.0000 \\ |
      | Cumulative Proportion & 0.2188 & 0.3625 & 0.4813 & 0.5747 &
      0.6476 & 0.7149 & 0.7692 & 0.8170 & 0.8541 & 0.8871 & 0.9159 &
      0.9429 & 0.9661 & 0.9872 & 1.0000 & 1.0000 \\ |
      | \hline |
      | \end{tabular} |
    | \end{center} |
  | \end{table} |
| |

Should I change some headers settings??

Best

[-- Attachment #2: Type: text/html, Size: 1759 bytes --]

             reply	other threads:[~2012-02-14 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14 15:31 Riccardo Romoli [this message]
     [not found] ` <87vcn99zv0.fsf@xtof-netbook.home>
2012-02-14 17:10   ` org-babel export table from R to LaTeX Riccardo Romoli
2012-02-14 17:25     ` Christophe Pouzat
2012-02-14 22:18       ` Andreas Leha
2012-02-15 11:00         ` Riccardo Romoli

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=CAHiM-bO7PNjWMpzt0VQY4Z5F8-p1DXqBfTZA3LhfJmd3JB75kw@mail.gmail.com \
    --to=ric.romoli@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).