[ESS] Have M-x R point at the most recent version of R

Manuel Teodoro teoten @end|ng |rom gm@||@com
Fri Sep 29 09:03:05 CEST 2023


ESS needs C:/Programme/R/R-4.2.2/bin/R.exe

I'm not sure if I'm missing something but it seems to me that you want to
define it in your init file, but then you will have to update it each time
that you change R versions. Use the following line

(setq inferior-ess-r-program "C:/Users/manuel/Bin/R-4.2.2/bin/R.exe")

Change the path for whichever path/version you have. For example, I am
developing some software under version 4.1.2 so, whenever I need to switch
to that I just write in the *scratch* buffer (it works from anywhere
actually) the following

(setq inferior-ess-r-program "C:/Users/manuel/Bin/R-4.1.2/bin/R.exe")

Stand at the very end of the line, C-x C-e to evaluate the expression and
my next R session. Since I don't do it often I just write and evaluate the
line. But it would be easy to create a function that switches versions as
you command it.

For me this is easier than allowing ESS to find it because I don't have it
installed in the default path due to admin restrictions. I hope it can help
you.

Manuel

On Wed, Sep 27, 2023 at 8:30 AM Hüsing, Johannes via ESS-help <
ess-help using r-project.org> wrote:

> Thanks for the hint.
>
> The path variable is now
> %USERPROFILE%\AppData\Local\Microsoft\WindowsApps;%USERPROFILE%\AppData\Local\Programs\MiKTeX\miktex\bin\x64;C:\Program
> Files\R\R-4.3.1\bin;
>
> M-x R will still start R-4.2.2. After renaming C:\Programme\R\R-4.2.2, M-x
> R will lead to Emacs displaying the message:
> C:/Programme/R/R-4.2.2/bin/R program not found
>
> Is there a way to proceed to notify ESS about the new version installed
> and have it start by default?
>
>
>
> Johannes Hüsing
> Epidemiologie
>
>
> Landeskrebsregister NRW gGmbH
> Gesundheitscampus 10
> 44801 Bochum
> T 0234 54509-216
> F 0234 54509-499
> Johannes.Huesing using krebsregister.nrw.de
> www.landeskrebsregister.nrw.de
>
>
> 1. Landesqualitätskonferenz jetzt anmelden unter Qualitätskonferenzen
> <www.landeskrebsregister.nrw/aktuelles/unsere-termine/qualitaetskonferenzen>
> Newsletter LKR NRW jetzt anmelden unter Newsletter
> <www.landeskrebsregister.nrw/aktuelles/newsletter>
> Geschäftsführer
> Dr. Andres Schützendübel
> Vorsitzender der Gesellschafterversammlung
> Staatssekretär Dr. Edmund Heller
> Sitz der Gesellschaft
> Bochum
> Registergericht
> Amtsgericht Bochum
> HRB 17715
>
> HINWEIS: Diese Nachricht ist nur für den Adressaten bestimmt. Es ist nicht
> erlaubt, diese Nachricht zu kopieren oder Dritten zugänglich zu machen.
> Sollten Sie irrtümlich diese Nachricht erhalten haben, bitte ich um Ihre
> Mitteilung per E-Mail oder unter der oben angegebenen Telefonnummer.
>
>
> -----Ursprüngliche Nachricht-----
> Von: Toby Hocking <tdhock5 using gmail.com>
> Gesendet: Dienstag, 26. September 2023 18:02
> An: Hüsing, Johannes <Johannes.Huesing using krebsregister.nrw.de>
> Cc: ess-help using r-project.org
> Betreff: Re: [ESS] Have M-x R point at the most recent version of R
>
> I put it on the path,
> Windows key -> Edit the system environment variables -> Environment
> variables... -> Double click Path -> add C:\Program
> Files\R\R-devel\bin\x64 or whatever
>
> On Tue, Sep 26, 2023 at 3:07 AM Hüsing, Johannes via ESS-help <
> ess-help using r-project.org> wrote:
> >
> > Dear ESS-helping crowd,
> > following the advice on https://r-pkgs.org/setup.html, I installed R
> version 4.3.1 for MS Windows from CRAN.
> >
> > How do I communicate to ESS that a new version has been installed? I
> read the advice on
> https://emacs.stackexchange.com/questions/60681/ess-start-process-does-not-include-new-r-version,
> I used the Emacs customisation dialogue to set ess-rterm-version-paths from
> C:/Program Files/R/R-4.2.2/bin/x64/Rterm.exe to C:/Program
> Files/R/R-4.3.1/bin/x64/Rterm.exe. After that, the variable
> ess-r-runner-prefixes, as well as ess-r-versions resolves to ("R-1" "R-2"
> "R-3" "R-4" "R-5" "R-6" "R-7" "R-devel" "R-patched"), and both M-x R and
> M-x R-newest will start R 4.2.2. The variable ess-r-versions-created
> resolves to (R-4.2.2-64bit), as does its alias ess-r-created-runners.
> Neither of these is customizable in the Emacs dialog.
> >
> > Is there a way to proceed to notify ESS about the new version installed?
> RStudio opened a miniscule dialog window indicating that it detected
> conflicting versions and had me choose one of them.
> >
> > Thanks for any hint.
> >
> >
> >
> > Dr. Johannes Hüsing
> > Epidemiologie
> >
> > Landeskrebsregister NRW gGmbH
> > Gesundheitscampus 10
> > 44801 Bochum
> >
> >
> >
> > T 0234 54509-216
> > F 0234 54509-499
> > Johannes.Huesing using krebsregister.nrw.de<mailto:Johannes.Huesing using krebsreg
> > ister.nrw.de>
> > www.landeskrebsregister.nrw<http://www.landeskrebsregister.nrw>
> >
> > Das Landeskrebsregister NRW online
> > FACEBOOK:
> > www.facebook.com/LKR.NordrheinWestfalen<http://www.facebook.com/LKR.No
> > rdrheinWestfalen>
> > INSTAGRAM: https://www.instagram.com/landeskrebsregister_nrw
> > NEWSLETTER: https://www.landeskrebsregister.nrw/aktuelles/newsletter
> >
> >
> > Geschäftsführer
> > Dr. Andres Schützendübel
> > Vorsitzender der Gesellschafterversammlung Staatssekretär Matthias
> > Heidmeier Sitz der Gesellschaft Bochum Registergericht Amtsgericht
> > Bochum HRB 17715
> >
> > HINWEIS: Diese Nachricht ist nur für den Adressaten bestimmt. Es ist
> nicht erlaubt, diese Nachricht zu kopieren oder Dritten zugänglich zu
> machen. Sollten Sie irrtümlich diese Nachricht erhalten haben, bitte ich um
> Ihre Mitteilung per E-Mail oder unter der oben angegebenen Telefonnummer.
> >
> >         [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > ESS-help using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/ess-help
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

	[[alternative HTML version deleted]]



More information about the ESS-help mailing list