[ESS] Re : Re: Re : Re: R-versions

Gérald Jean gerald.jean at videotron.ca
Fri Oct 10 14:50:06 CEST 2014


Hello Martin,

thanks for those detailed explanations.

And yes, before writing to the list, I checked the doc and I ran 
ess-r-versions-create and then checked ess-r-versions-created and plain 
"R" wasn't part of it, if I recall properly.  I also checked the Emacs 
exec-path variable it "seems" to me that the path to R was in it???  But 
I am not at work right now and I can't check it out, in fact I will be 
off work for the next two weeks and won't be able to check it, poor me, 
I'm on vacation!!!!

This is a new admin who installed this last version of R and maybe he 
didn't installed it exactly in the same directory???  But I am setting 
up RStudio for collegues, who won't use Emacs, and RStudio, running from 
a Web interface, had no problems finding the newest version of R, hence 
the installation directory must have been in my PATH variable, so it is 
still a bit mysterious to me why Emacs didn't find it???

Any way, I'll keep checking it out when I'm back from vacation.

Thanks for explaining how ess tries to find R versions,

Gérald

Le 10/10/2014 03:08, Martin Maechler a écrit :
>>>>>> Gérald Jean <gerald.jean at videotron.ca>
>>>>>>      on Thu, 9 Oct 2014 13:55:23 -0400 writes:
>      > Yes,
>      > in fact several times as I played with the settings in my .emacs, trying to make it work. But it works now with the inclusion of Ista's settings.
>
> Well, but that is really a  "last resort" workaround that should
> never be necessary.
> I have not used such a setting for more than 10 years probably !
>
> At startup, ESS tries (quite a bit) to find all versions of R
> installed on your computer, i.e., (as Vitalie mentioned) in your
> PATH  (environment variable) or more precisely in the  exec-path
> emacs lisp variable - which is typically initialized from the
> above PATH (and other emacs settings).
>
> If "the rest" of your computer / emacs setup is "sane", it just
> *should* find the R version.
>
> More technically what happens:
> In ess-site.el, there's a function  ess-r-s-versions-creation
> defined and called.
> For R, it makes use of the the function
> ess-r-versions-create  you could re-call yourself via M-x ess-r-versions-create.
> That functions (re)creates a global variable
>
>       ess-r-versions-created
>
> which you can ask about (and see the value) via
>
>        C-h v ess-r-versions-created
>
> For me, its content is humongous, because I - as R core member
> and "R archaelogist" try to keep many versions of R being available:
>
> So for me, the above shows
>
> ("R-1.9.1" "R-1.9.0" "R-1.8.0" "R-1.7.1" "R-1.7.0" "R-1.7" "R-1.6.2" "R-1.6.1" "R-1.6.0" "R-1.5.1" "R-1.5.0" "R-1.4.1" "R-1.4.0" "R-1.3.1" "R-1.3.0" "R-1.2.3" "R-1.2.2" "R-1.2.1" "R-1.2.0" "R-1.1.1" "R-1.1.0" "R-1.0.1" "R-1.0.0" "R-2-debian" "R-2.9.2" "R-2.9.1" "R-2.9.0" "R-2.8.1" "R-2.8.0" "R-2.7.2" "R-2.7.1" "R-2.7.0" "R-2.6.2" "R-2.6.1" "R-2.6.0" "R-2.5.1" "R-2.5.0" "R-2.4.1" "R-2.4.0" "R-2.3.1" "R-2.3.0" "R-2.2.1" "R-2.2.0" "R-2.15.3" "R-2.15.2" "R-2.15.1" "R-2.15.0" "R-2.14.2" "R-2.14.1" "R-2.14.0" "R-2.13.2" "R-2.13.1" "R-2.13.0" "R-2.12.2" "R-2.12.1" "R-2.12.0" "R-2.11.1" "R-2.11.0" "R-2.10.1" "R-2.10.0" "R-2.1.1" "R-2.1.0" "R-2.0.1" "R-2.0.0" ....
>   "R-3.1.1" "R-3.1.0" "R-3.0.3" "R-3.0.2" "R-32norm" "R-3.0.1" "R-3.0.0"
> "R-devel-valgrind-lev2" "R-devel-no-ldouble" "R-devel"
> ....
> )
>
> Yes, all these are in my PATH (typically almost all the above via symbolic
> links into a /usr/local/bin/  PATH) when I start emacs.
>
> Using symbolic links into a directory which is definitely on
> your PATH allows you to have many different versions of R
> available within the same emacs ESS session.
>
> But it remains a riddle via  /usr/bin does not seem to be part
> of your PATH ... or more likely not part of your emacs
> exec-path. That's why  Vitalie has asked about those.
>
> In short, please report (from Emacs)
>
>         C-h v exec-path
>
> and (from a shell / terminal -- try both  M-x shell from inside
>         Emacs, and a shell / simple terminal outside emacs) :
>
>         echo $PATH
>
>
> Martin
>
>
>      > Le 09/10/14, Rmh  <rmh at temple.edu> a �crit :
>      >> did you restart emacs after the installation so its information would be refreshed?
>      >>
>      >> Rich
>      >>
>      >> Sent from my iPhone
>      >>
>      >> > On Oct 9, 2014, at 12:26, "G�rald Jean" <gerald.jean at videotron.ca> wrote:
>      >> >
>      >> > Thanks Ista,
>      >> >
>      >> > it worked just fine. What surprises me though is that until yesterday, before 3.1.1 was installed by admin, I didn't have any special statement in my .emacs for the system's version of R, the previous one being 2.15.?
>      >> >
>      >> > G�rald
>      >> >
>      >> > Le 09/10/14, Ista Zahn <istazahn at gmail.com> a �crit :
>      >> >> I think you can set inferior-R-program-name, e.g.,
>      >> >>
>      >> >> (setq inferior-R-program-name "/usr/bin/R")
>      >> >>
>      >> >> However, I don't see that documented in the manual[1], and it seems to
>      >> >> be a FAQ. Should this be documented, or is there another recommended
>      >> >> way to do it?
>      >> >>
>      >> >> Best,
>      >> >> Ista
>      >> >>
>      >> >> [1] http://ess.r-project.org/Manual/ess.html#Latest-version
>      >> >>
>      >> >>> On Thu, Oct 9, 2014 at 11:27 AM, "G�rald Jean" <gerald.jean at videotron.ca> wrote:
>      >> >>> Hello,
>      >> >>>
>      >> >>> I am running R from ESS on a linux box (RedHat). The admin of the server just installed R-3.1.1 in /usr/bin and I can't start it from Emacs, starts OK from the command line just by typing R.
>      >> >>>
>      >> >>> I also have a patched version (3.1.0) installed in a private directory. From Emacs, "M-x R", "M-x R-patched" and "M-x R-newest" all start the R-3.1.0 patched version???
>      >> >>>
>      >> >>> I also have TERR and Revo64 from RevolutionAnalytics installed in a private directory, I can start any of them from Emacs but not the R-3.1.1, installed in the standard /usr/bin location???
>      >> >>>
>      >> >>> Any ideas???
>      >> >>>
>      >> >>> Thanks for your support,
>      >> >>>
>      >> >>> G�rald Jean



More information about the ESS-help mailing list