[ESS] ESS on an odd setup
Stephen Eglen
@je30 @end|ng |rom c@m@@c@uk
Fri Nov 4 20:22:27 CET 2016
Would something like the following work?
Somewhere in your local path add a short bash script called "R-3.2-mine"
containing
----------------------------------------------------------------------
#!/bin/sh
module load R
R
----------------------------------------------------------------------
then restart Emacs and hopefully M-x R-3.2-mine will work (as should M-x
R-newest). You must name your script so that it matches something in
the variable list `ess-r-versions':
----------------------------------------------------------------------
ess-r-versions is a variable defined in ‘ess-r-d.el’.
Its value is ("R-1" "R-2" "R-3" "R-devel" "R-patched" "R32" "R64")
Documentation:
List of partial strings for versions of R to access within ESS.
Each string specifies the start of a filename. If a filename
beginning with one of these strings is found on ‘exec-path’, a M-x
command for that version of R is made available. For example, if the
file "R-1.8.1" is found and this variable includes the string
"R-1", a function called ‘M-x R-1.8.1’ will be available to run that
version of R.
If duplicate versions of the same program are found (which happens if
the same path is listed on ‘exec-path’ more than once), they are
ignored by calling ‘ess-uniq-list’.
Set this variable to nil to disable searching for other versions of R.
If you set this variable, you need to restart Emacs (and set this variable
before ess-site is loaded) for it to take effect.
----------------------------------------------------------------------
Stephen
On Fri, Nov 04 2016, Gavin Kelly wrote:
> Hello
>
> My work's computer facilities have only just been set up, and the sysadmin has decided to go for an easybuild module system, which means that to start R, I need to type "module load R" to get the environment set correctly - unless I do that, R doesn't appear to be installed. Unfortunately that messes up emacs' paths, so I'm forced to invoke emacs, then start a 'M-X shell', type in the "module load R", and finally point ess-remote at my shell buffer.
>
> I know I should get the sysadmin to make this smoother, and he's working on it, but in case it never happens, is there a better work-flow anyone can think of (I tried setting a bash alias to R that - or at least a way of preventing ESS from grumbling that no R is found when I open a .R file (I installed ESS via the MELPA package, which also may be not be ideal, as there's some magic happening with package-initialize that's trigger R when I open .R files).
>
> Thanks -Gavin
>
> The Francis Crick Institute Limited is a registered charity in England and Wales no. 1140062 and a company registered in England and Wales no. 06885462, with its registered office at 215 Euston Road, London NW1 2BE.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
More information about the ESS-help
mailing list