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çois