emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] HowTo? have R :sessions in org mode invoke a specific R


From: Nick Dokos
Subject: Re: [O] HowTo? have R :sessions in org mode invoke a specific R
Date: Mon, 25 Nov 2013 16:56:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

"Cook, Malcolm" <address@hidden> writes:

>>On Mon, Nov 4, 2013 at 11:22 AM, Cook, Malcolm <address@hidden> wrote:
>  >> I wish to lock an org buffer to a particular installation of R so that 
> all code blocks use it.
>  >>
>  >> I found that I could not, for instance, write `:session R-3.0.1`.
>  >>
>  >> Is there some best way for me to accomplish this?
>  >>
>  >> Perhaps some way of setting inferior-R-program-name to a buffer local 
> value?
>  >
>  >I'm no good at in-buffer variables, but this one looks of interest:
>  >org-babel-R-command
>
> Indeed, John,  that is the variable I would like to have respected when I
>
> (setq-local inferior-R-program-name "R-3.0.1")
>
>
> But, alas it is not.
>
> Any other takers?
>
> Thanks!

I think you got it backwards: if you are trying to use org-babel to
evaluate an R code block, then the variable you should set is
org-babel-R-command as John indicated. Setting inferior-R-program-name
to something does not tell anything to org-babel. To use your term,
org-babel does not respect inferior-R-program-name; the only thing it
knows is org-babel-R-command. Only ESS respects inferior-R-program-name,
but you are not using ESS here. So have you tried

 (setq-local org-babel-R-command "R-3.0.1 --slave --no-save")

in your org-mode buffer where you are evaluating your R code?
The options are guesses based on the current setting. Untested since
I know virtually nothing about R.

Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]