[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel][PATCHES] ob-R patches for review
From: |
Rainer M Krug |
Subject: |
Re: [O] [babel][PATCHES] ob-R patches for review |
Date: |
Thu, 01 May 2014 11:10:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) |
"Charles C. Berry" <address@hidden> writes:
> 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.
No problem.
>
>
>>
>>>
>>> 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.
This assumes, that the user knows elisp. For many customizations this is
necessary, but I would prefer a system where the user only has to
provide an R function which will be used. This offers less
customizability, but this would make it possible to use R to do the
customization. To write a new org-babel-R-assign-elisp-function would be
quite a challenge for an R programmer (like me...).
Thanks,
Rainer
>
>
> Best,
>
>
> Chuck
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: address@hidden
Skype: RMkrug
PGP: 0x0F52F982
pgpzO6TI6pH0N.pgp
Description: PGP signature
- Re: [O] [babel][PATCHES] ob-R patches for review,
Rainer M Krug <=