From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikas Rawal Subject: Displaying regression results from R in beamer Date: Sun, 23 Jun 2013 07:44:47 +0530 Message-ID: <20130623021447.GA9631@panahar> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UqZpQ-0006Gq-Gu for emacs-orgmode@gnu.org; Sat, 22 Jun 2013 22:14:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UqZpP-00055i-AP for emacs-orgmode@gnu.org; Sat, 22 Jun 2013 22:14:56 -0400 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:41799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UqZpO-00055e-W9 for emacs-orgmode@gnu.org; Sat, 22 Jun 2013 22:14:55 -0400 Received: by mail-pa0-f46.google.com with SMTP id fa11so9522260pad.19 for ; Sat, 22 Jun 2013 19:14:53 -0700 (PDT) Received: from panahar ([203.122.34.5]) by mx.google.com with ESMTPSA id pl9sm11468280pbc.5.2013.06.22.19.14.51 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 22 Jun 2013 19:14:52 -0700 (PDT) Content-Disposition: inline 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 I want to display regression results from an R source block in a beamer export. The best I could find was to use R libraries stargazer or texreg to produce latex code from the regression results. However, when I use #+BEGIN_SRC R :results value latex #+END_SRC The output I get is enclosed in | on both sides: #+BEGIN_LaTeX | | | % Table created by StarGazer v.3.0.1 by Marek Hlavac, Harvard University. E-mail: hlavac at fas.harvard.edu | | % Date and time: Sun, Jun 23, 2013 - 07:41:02 | | \begin{table}[htb] \centering | | \caption{} | | \label{} | | \footnotesize | | | | \begin{tabular}{@{\extracolsep{5pt}}lc} | | \\[-1.8ex]\hline | | \hline \\[-1.8ex] | | & \multicolumn{1}{c}{\textit{Dependent variable:}} \\ | | \cline{2-2} | | \\[-1.8ex] & Days\_per\_capita\_men \\ | | \hline \\[-1.8ex] | | Land\_cultivated & $0.015$ \\ | | & $(0.027)$ \\ | | & \\ | | Social\_groupScheduled tribe & $0.336^{***}$ \\ | | & $(0.076)$ \\ | | & \\ | | Social\_groupMuslim & $-0.022$ \\ | | & $(0.098)$ \\ | | & \\ | | Social\_groupOthers & $0.141^{**}$ \\ | | & $(0.063)$ \\ | | & \\ | | Household\_type2 & $0.775^{***}$ \\ | | & $(0.105)$ \\ | | & \\ | | Household\_type3 & $0.987^{***}$ \\ | | & $(0.100)$ \\ | | & \\ | | Household\_type4 & $-0.277^{**}$ \\ | | & $(0.120)$ \\ | | & \\ | | Household\_type9 & $0.684^{***}$ \\ | | & $(0.175)$ \\ | | & \\ | | Constant & $4.538^{***}$ \\ | | & $(0.102)$ \\ | | & \\ | | \hline \\[-1.8ex] | | Observations & $4,556$ \\ | | R$^{2}$ & $0.066$ \\ | | Adjusted R$^{2}$ & $0.065$ \\ | | Residual Std. Error & $1.740 (df = 4547)$ \\ | | F statistic & $40.440^{***} (df = 8; 4547)$ \\ | | \hline | | \hline \\[-1.8ex] | | \textit{Note:} & \multicolumn{1}{r}{$^{*}$p$<$0.1; $^{**}$p$<$0.05; $^{***}$p$<$0.01} \\ | | \normalsize | | \end{tabular} | | \end{table} | #+END_LaTeX How do I get rid of these |s? The R terminal where the source block is bring processed shows correct latex code, but when it is inserted into the orgmode file, it comes enclosed in | characters. Will appreciate any help. Vikas