From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Fran=C3=A7ois_Pinard?= Subject: Discovering Babel and R combination! Date: Sun, 15 Jul 2012 23:44:33 -0400 Message-ID: <86d33w74ke.fsf@mercure.progiciels-bpi.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqcEe-0005ma-BO for emacs-orgmode@gnu.org; Sun, 15 Jul 2012 23:44:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqcEd-0000Hl-9O for emacs-orgmode@gnu.org; Sun, 15 Jul 2012 23:44:36 -0400 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:55887 helo=mercure.progiciels-bpi.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqcEd-0000Hb-2Z for emacs-orgmode@gnu.org; Sun, 15 Jul 2012 23:44:35 -0400 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 Hi, Org people. A while ago, I started to get acquainted a bit with Babel, mainly as a curiosity for an area of Org I did not know nor use yet. However, for a couple of weeks now, I'm starting to better understand how useful the combination of Babel and R may be in real situations. While documenting a few databases, exploring them with R mainly, I first developed the habit of saving some of my R code aside, as a reminder to myself for later retries or further discussions with colleagues. But I'm finding out that it is much more fruitful to put the R code directly in my documentation, taking advantage of Babel to insert the R output and graphics right into it. It gets especially interesting because of R sessions within Org, which may be used to cache prior computation results, yielding comfortable interaction speed. Also, despite hundreds of included graphics already, I do not feel any slowdown in Emacs yet. I think I'm going to just love it! :-) Thanks to all contributors! ------------------ There are tiny improvements or questions which I would like to discuss, however. As this is all new and a bit overwhelming for me, I apologize if my reports are a bit fuzzy, I guess dust should settle as days pass, and would likely develop a clearer understanding with time. One thing is that I very often have to do "C-c C-x C-v C-c C-x C-v", that is that I toggle in-lining of images out and in. It seems that whenever I save the file, or use "C-c C-c" within an R Babel block, the images stop being in-lined, while the in-line image flag is not reset. Ideally, saving a file should not hide in-lined images. If, for some technical reason, this is unavoidable, then at least, the in-line image flag should always tell the truth, so "C-c C-x C-v" would be sufficient to recall back the images. Real fun would be that any "C-c C-c" which triggers the re-computation of an already displayed graphics, merely gets the displayed graphics to get updated in place, without any more special interaction needed to re-in-line it. Another point which gave me some fight to do is the disappearing of column and row headers in non-graphical output. I only get the raw data of the results. I found it quite annoying with R table() output, for example, which are rather meaningless with no titles at all. Currently, the only reasonable solution I have is to use ":results output org", combined with an ascii() call on the R side, once ascii configured to create Org style output (quite a nice feature, should I say!). Yet, it would be all nicer and cleaner if none of this extra machinery was required. A very minor point is that, within a #+BEGIN_ORG / #+END_ORG block, I sometimes see an extraneous space at the very beginning, before the first "|". Sometimes I do not see it, and output is perfect. I'll try to find some coincidence with other things, that would allow to hypothesize a cause. Or else, to reproduce the problem with data which is public enough that I could share it. I call it a day for now and get some sleep :-). With enough luck, will find some time to revisit this tomorrow. Yet before leaving today, I wanted to say and share my enthusiasm for this Org Babel / R combination, and also report the tiny problems above. Keep happy, all! Fran=C3=A7ois