Replying on an old thread: > >>On Mon, Nov 4, 2013 at 11:22 AM, Cook, Malcolm <m...@stowers.org> > 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")
Yes! Indeed! And, Thanks! And... I don't even need to remember to eval the setq statement if I include in my org the following works everytime # Local Variables: # org-babel-R-command: "R-3.0.1 --slave --no-save" # End: Or put it as first line in the file: # -*- org-babel-R-command: "R-3.0.1 --slave --no-save"-*- Cheers, Malcolm > > 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 >