[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel][PATCHES] ob-R patches for review
From: |
Charles C. Berry |
Subject: |
Re: [O] [babel][PATCHES] ob-R patches for review |
Date: |
Wed, 30 Apr 2014 15:49:12 -0700 |
User-agent: |
Alpine 2.00 (OSX 1167 2008-08-23) |
On Wed, 30 Apr 2014, Rainer M Krug wrote:
Charles Berry <address@hidden> writes:
Rainer M Krug <Rainer <at> krugs.de> writes:
Hi
Attached please find seven patches for review to implement the storing
of org variables in their own environment and to make the org-issued R
code look nicer in the R session.
Rainer,
I have suggestions and a concern.
I suggest [...]
That is effectively what I am doing as well, only that I am not using a
package but an environment and add it to the search path.
[...]
OK. I did not study your patches closely enough. Sorry.
I also suggest that you introduce a customization variable to
allow a user to turn off the functionality you have created.
I don't think this is necessary as the behavior for the user does not
change at all, only that it becomes safer to use org variables in R (see
above).
All you have to do is add this:
(defvar org-babel-R-assign-elisp-function 'org-babel-R-assign-elisp
"Name or definition of function to handle `:var name=value'
header args."
)
and change one line in org-babel-variable-assignments:R from
(org-babel-R-assign-elisp
to
(funcall org-babel-R-assign-elisp-function
and the user can provide her own elisp assignment function.
This gives users who want special behavior like creating something
other than a data.frame the option of providing their own function.
Best,
Chuck