From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: [babel] noweb expansion of LaTeX output from R Date: Sun, 1 Nov 2009 11:45:26 -1000 Message-ID: <059A4FD8-DD27-4438-8032-C93988BCAB65@tsdye.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4iEx-0004MM-1p for emacs-orgmode@gnu.org; Sun, 01 Nov 2009 16:45:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4iEs-0004Li-ID for emacs-orgmode@gnu.org; Sun, 01 Nov 2009 16:45:34 -0500 Received: from [199.232.76.173] (port=59882 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4iEs-0004Lf-CW for emacs-orgmode@gnu.org; Sun, 01 Nov 2009 16:45:30 -0500 Received: from outbound-mail-26.bluehost.com ([69.89.17.191]:32964) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N4iEr-0004IJ-Qc for emacs-orgmode@gnu.org; Sun, 01 Nov 2009 16:45:30 -0500 Received: from cpe-24-161-159-72.hawaii.res.rr.com ([24.161.159.72] helo=[192.168.1.2]) by box472.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1N4iEq-0001mZ-1e for emacs-orgmode@gnu.org; Sun, 01 Nov 2009 14:45:28 -0700 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Aloha all, Is it possible to use the noweb syntax to pass LaTeX output from R into a latex source block? I thought this would work, but the noweb expansion yields nil. Please note that this is just a question and not a request for a change to org-babel. In this particular case, the best solution for my workflow appears to be sending the table to a file, where I can tweak the results more easily and completely than I can using the facilities of the xtable package in R. It does seem like a potentially useful path, though. The following source and results blocks illustrate the situation, but won't run unless you have a whole.adze object in the R session. If need be, I can supply an example that will stand alone. All the best, Tom #+begin_src latex Here is the output of the quantile function: <>. #+end_src #+srcname: r-weight-quantile #+begin_src R :session :noweb :results output library(xtable) weight <- quantile(whole.adze$weight) xtable(as.data.frame(weight)) #+end_src #+resname: r-weight-quantile #+begin_example % latex table generated in R 2.9.2 by xtable 1.5-5 package % Sun Nov 1 11:17:44 2009 \begin{table}[ht] \begin{center} \begin{tabular}{rr} \hline & weight \\ \hline 0\% & 0 \\ 25\% & 22 \\ 50\% & 34 \\ 75\% & 83 \\ 100\% & 2580 \\ \hline \end{tabular} \end{center} \end{table} #+end_example