From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [babel][PATCHES] ob-R patches for review Date: Thu, 01 May 2014 11:10:26 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wfn10-00038i-L6 for emacs-orgmode@gnu.org; Thu, 01 May 2014 05:10:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wfn0w-0002fZ-4m for emacs-orgmode@gnu.org; Thu, 01 May 2014 05:10:50 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:36291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wfn0v-0002fH-UQ for emacs-orgmode@gnu.org; Thu, 01 May 2014 05:10:46 -0400 Received: by mail-wi0-f178.google.com with SMTP id hm4so348705wib.5 for ; Thu, 01 May 2014 02:10:45 -0700 (PDT) In-Reply-To: (Charles C. Berry's message of "Wed, 30 Apr 2014 15:49:12 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Charles C. Berry" Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable "Charles C. Berry" writes: > On Wed, 30 Apr 2014, Rainer M Krug wrote: > >> Charles Berry writes: >> >>> Rainer M Krug 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=3Dvalue' > 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 =2D-=20 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: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJTYg+GAAoJENvXNx4PUvmCle8IANiVr1uuT1Uggwnn1LWCCgua MCX6xi7NQPZ1DtjK32sqx0umlSKZbjIad3EnH/Ntgn81JMCb/VOCri5mJiKatexX zTasKVMpK81txCeD32dLxGGbZKn9lLvqKV5ECjtw7cR+nAn8r/7wKE1C3KE2V5Ev a1QaNrdalCLYkyr7QKG7g38omTVI+7cL/G/NyKlJteOMYURF06BuBE+WW89XdpcH eBV/Ewqf6o5cyoke7ocW3KEQlAiutAQkd14LQPVvj1MfX9R96kxaY59PS53SuoVO 5c0vtGJa8B1f/KiXEQNHs2ZXNJmaDWJvSXAMHWm0W9HYeM/2IaoXqogIB6Dlr28= =97AE -----END PGP SIGNATURE----- --=-=-=--