From mboxrd@z Thu Jan 1 00:00:00 1970 From: Riccardo Romoli Subject: org-babel export table from R to LaTeX Date: Tue, 14 Feb 2012 16:31:32 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00235452ef5426a4a404b8ee4ad4 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxKLz-00087q-Vb for emacs-orgmode@gnu.org; Tue, 14 Feb 2012 10:31:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxKLu-0000Rj-0W for emacs-orgmode@gnu.org; Tue, 14 Feb 2012 10:31:39 -0500 Received: from mail-qw0-f48.google.com ([209.85.216.48]:63882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxKLt-0000RV-UH for emacs-orgmode@gnu.org; Tue, 14 Feb 2012 10:31:33 -0500 Received: by qauh8 with SMTP id h8so399955qau.0 for ; Tue, 14 Feb 2012 07:31:32 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --00235452ef5426a4a404b8ee4ad4 Content-Type: text/plain; charset=ISO-8859-1 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 --00235452ef5426a4a404b8ee4ad4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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
.....
=A0 print(xtable(summary(mypca)))
#+end_src

I do not understand w= hy 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] |
=A0 | \begin{center} |
=A0=A0=A0 | \begin{tabu= lar}{rrrrrrrrrrrrrrrrr} |
=A0=A0=A0=A0=A0 | \hline |
=A0=A0=A0=A0=A0= | & PC1 & PC2 & PC3 & PC4 & PC5 & PC6 & PC7 &a= mp; PC8 & PC9 & PC10 &
=A0=A0=A0=A0=A0 PC11 & PC12 & PC13 & PC14 & PC15 & PC16= \\ |
=A0=A0=A0=A0=A0 | \hline |
=A0=A0=A0=A0=A0 | Standard deviatio= n & 3.4693 & 2.8113 & 2.5561 & 2.2668 &
=A0=A0=A0=A0= =A0 2.0015 & 1.9236 & 1.7287 & 1.6220 & 1.4288 & 1.3456= & 1.2596 &
=A0=A0=A0=A0=A0 1.2195 & 1.1278 & 1.0778 & 0.8390 & 0.0000 = \\ |
=A0=A0=A0=A0=A0 | Proportion of Variance & 0.2188 & 0.1437= & 0.1188 & 0.0934 &
=A0=A0=A0=A0=A0 0.0728 & 0.0673 &am= p; 0.0543 & 0.0478 & 0.0371 & 0.0329 & 0.0289 &
=A0=A0=A0=A0=A0 0.0270 & 0.0231 & 0.0211 & 0.0128 & 0.0000 = \\ |
=A0=A0=A0=A0=A0 | Cumulative Proportion & 0.2188 & 0.3625 &= amp; 0.4813 & 0.5747 &
=A0=A0=A0=A0=A0 0.6476 & 0.7149 &= 0.7692 & 0.8170 & 0.8541 & 0.8871 & 0.9159 &
=A0=A0=A0=A0=A0 0.9429 & 0.9661 & 0.9872 & 1.0000 & 1.0000 = \\ |
=A0=A0=A0=A0=A0 | \hline |
=A0=A0=A0=A0=A0 | \end{tabular} | =A0=A0=A0 | \end{center} |
=A0 | \end{table} |
| |

Should = I change some headers settings??

Best

--00235452ef5426a4a404b8ee4ad4--