From mboxrd@z Thu Jan 1 00:00:00 1970 From: "G. Jay Kerns" Subject: Re: Formatting R output Date: Mon, 10 Sep 2012 10:48:49 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7BIT Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB5Ik-0004Zw-Ke for emacs-orgmode@gnu.org; Mon, 10 Sep 2012 10:49:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TB5IW-0003eZ-Du for emacs-orgmode@gnu.org; Mon, 10 Sep 2012 10:49:26 -0400 Received: from ppoint1.cc.ysu.edu ([150.134.10.210]:53406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB5IW-0003dx-8W for emacs-orgmode@gnu.org; Mon, 10 Sep 2012 10:49:12 -0400 Received: from pps.filterd (ppoint1 [127.0.0.1]) by ppoint1 (8.14.4/8.14.4) with SMTP id q8AEmhGL025804 for ; Mon, 10 Sep 2012 10:49:10 -0400 Received: from myysumail.ysu.edu (myysumail.ysu.edu [150.134.10.132]) by ppoint1.cc.ysu.edu with ESMTP id 176d432dhd-1 for ; Mon, 10 Sep 2012 10:49:10 -0400 Received: from mail-vb0-f41.google.com ([209.85.212.41]) by myysumail.ysu.edu (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTPSA id <0MA500HXW2HXNB10@myysumail.ysu.edu> for emacs-orgmode@gnu.org; Mon, 10 Sep 2012 10:49:10 -0400 (EDT) Received: by vbkv13 with SMTP id v13so2492569vbk.0 for ; Mon, 10 Sep 2012 07:49:09 -0700 (PDT) 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 Dear Erich, comments inline below. > From: Neuwirth Erich univie.ac.at> > Subject: Formatting R output > Newsgroups: gmane.emacs.orgmode > Date: 2012-09-10 12:12:00 GMT > > I am using org-mode with R. > I already wrote a message about formatting inline code some time ago. > After working more with R in org-mode (which I _really_ like) I have some > questions and/or suggestions. > > 1) a mild annoyance. > > src_R{1+1} inserts the result 2 in the output. In fact, it inserts =2=. > When one runs the file repeatedly, org-mode does not remove older results. > So if I replace src_R{1+1} by src_R{2+2} and do not remove the last output, > My file will contain > > src_R{2+2} =4= =2= > > Also, If I run the inline code segment by C-c C-c one, the org file ail contain just 1 > correct result, bit if afterwards I export the file (to LaTeX or html), > the exported file will have 2 copies of the result. > > Is there anything the developers can do about this? I can confirm that if a person does not remove old output but changes input to the inline code segment then the exported file will have both the correct output plus the (old) incorrect output. My strategy to avoid this is use C-c C-c sparingly just to check whether the output is as expected, then always erase output. If I am going to use an org file with C-c C-c a lot (for a lecture, say), then I keep a copy for exporting clean and separate from the one I am going to do a lot of C-c C-c'ing with. YMMV. > 2) formatting inline output. > As discussed above, using inline code produces something like > src_R{2+2} =4= > > In some cases, I would like the result to be not on fixed font. > Currently, I to not see a way of removing the equal signs before and after the result, > they seem to be added by org itself, therefore I cannot use trickery in R to remove them. > Could the developers think of an option which would allow to get the result > without the bracketing equal signs? I think you can fix this with inline code-segment header arguments which will override buffer-wide or system wide settings. So, for example, you could do src_R[:results raw]{2 + 2} which will return 4 and not =4=. I hope this helps, Jay -- ************************************* G. Jay Kerns, Ph.D. Associate Professor Mathematics and Statistics http://people.ysu.edu/~gkerns/