Since I have two code blocks, I need to use :session. If I define
:session buffer-wide as
#+BABEL: :session *R*
then the matrix cormat is unknown within the second code block ("object
'cormat' not found"). However, if I specify :session for each code block
seperately then it works as expected.
Hi Bernd,
The above does work for me. Some things to check:
1. After altering the #+BABEL line, it's necessary to refresh Org's
file-local options, for example with C-c C-c on the #+BABEL
line. (Same is true for #+OPTIONS, #+PROPERTY, etc)
2. I've just fixed a bug which was causing it to fail to work on the
first attempt... But it did work on second and subsequent attempts.
Please note that it is possible to make an equivalent setting using
#+PROPERTY: session *R*
In fact, I suspect we are going to drop #+BABEL entirely, so please
consider it deprecated and use this form instead.
After evaluating the first block, an ESS R buffer named *R* should
exist, in which the variable cormat should be defined. Let me know if
your problem persists.