* Discovering Babel and R combination!
@ 2012-07-16 3:44 François Pinard
2012-07-16 6:37 ` Thomas S. Dye
2012-07-21 10:55 ` Ippei FURUHASHI
0 siblings, 2 replies; 4+ messages in thread
From: François Pinard @ 2012-07-16 3:44 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Discovering Babel and R combination!
2012-07-16 3:44 Discovering Babel and R combination! François Pinard
@ 2012-07-16 6:37 ` Thomas S. Dye
2012-07-16 13:57 ` François Pinard
2012-07-21 10:55 ` Ippei FURUHASHI
1 sibling, 1 reply; 4+ messages in thread
From: Thomas S. Dye @ 2012-07-16 6:37 UTC (permalink / raw)
To: François Pinard; +Cc: emacs-orgmode
Aloha François,
François Pinard <pinard@iro.umontreal.ca> writes:
> 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.
Have you discovered :colnames and :rownames? These two header arguments
might do what you want.
All the best,
Tom
>
> 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
>
>
>
>
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Discovering Babel and R combination!
2012-07-16 3:44 Discovering Babel and R combination! François Pinard
2012-07-16 6:37 ` Thomas S. Dye
@ 2012-07-21 10:55 ` Ippei FURUHASHI
1 sibling, 0 replies; 4+ messages in thread
From: Ippei FURUHASHI @ 2012-07-21 10:55 UTC (permalink / raw)
To: François Pinard; +Cc: emacs-orgmode
Hi François,
> 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.
The following discussion can help
http://article.gmane.org/gmane.emacs.orgmode/34194
to set
: (add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
If you also want to skip the confirmation by babel on evaluation, see
: (info "(org)Code evaluation security")
HTH,
IP
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-21 10:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-16 3:44 Discovering Babel and R combination! François Pinard
2012-07-16 6:37 ` Thomas S. Dye
2012-07-16 13:57 ` François Pinard
2012-07-21 10:55 ` Ippei FURUHASHI
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).