Installing different R versions

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing different R versions

Luca Cerone
Dear all,
on one shared machine we have an older R version installed. Some packages
have known issues with that version that are fixed in newer R versions.

Since that is a production machine with many jobs running we would like to
keep things as they are. However I would also like to keep advantage of the
newest version and the bug fixes introduced.

What would be the best way to install a newer version along the one that
already exists? Is it possible to install it for a specific user only?

Cheers,
Luca

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Installing different R versions

Loris Bennett-2
Dear Luca,

Luca Cerone <[hidden email]> writes:

> Dear all,
> on one shared machine we have an older R version installed. Some packages
> have known issues with that version that are fixed in newer R versions.
>
> Since that is a production machine with many jobs running we would like to
> keep things as they are. However I would also like to keep advantage of the
> newest version and the bug fixes introduced.
>
> What would be the best way to install a newer version along the one that
> already exists? Is it possible to install it for a specific user only?
>
> Cheers,
> Luca

If you are on a Unix-like platform, a standard way of dealing with
multiple versions of a piece of software installed in parallel is
"Environment Modules":

http://modules.sourceforge.net/

Packages for various Linux distributions are available.

You could make a version available for a specific user by setting
appropriate file permissions of the module file which is used to set up
the environment.  However, I would consider this a somewhat unusual
configuration.  If you are worried about people using the wrong version
by mistake, you can either have the standard version available without
using modules, or you can define a default version within the modules
setup.

HTH

Loris

--
This signature is currently under construction.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Installing different R versions

Wolfgang Raffelsberger-3
check out the official document
*R Installation and Administration*
from https://cran.r-project.org/manuals.html
There you'll find how to define a specific path for each installation.

(Since a number of years I administrate multiple versions of R at different
platforms, of course including Linux)

Wolfgang

2015-10-07 9:04 GMT+02:00 Loris Bennett <[hidden email]>:

> Dear Luca,
>
> Luca Cerone <[hidden email]> writes:
>
> > Dear all,
> > on one shared machine we have an older R version installed. Some packages
> > have known issues with that version that are fixed in newer R versions.
> >
> > Since that is a production machine with many jobs running we would like
> to
> > keep things as they are. However I would also like to keep advantage of
> the
> > newest version and the bug fixes introduced.
> >
> > What would be the best way to install a newer version along the one that
> > already exists? Is it possible to install it for a specific user only?
> >
> > Cheers,
> > Luca
>
> If you are on a Unix-like platform, a standard way of dealing with
> multiple versions of a piece of software installed in parallel is
> "Environment Modules":
>
> http://modules.sourceforge.net/
>
> Packages for various Linux distributions are available.
>
> You could make a version available for a specific user by setting
> appropriate file permissions of the module file which is used to set up
> the environment.  However, I would consider this a somewhat unusual
> configuration.  If you are worried about people using the wrong version
> by mistake, you can either have the standard version available without
> using modules, or you can define a default version within the modules
> setup.
>
> HTH
>
> Loris
>
> --
> This signature is currently under construction.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Installing different R versions

Luca Cerone
Dear Loris and Wolfgang,
thanks a lot for the help!

I wasn't aware of the module project. I'd rather use the "official"
way of having co-existent R versions in this case,
but is a good tool to know!

Thanks again for the help!

Cheers,
Luca

On Wed, Oct 7, 2015 at 4:27 PM, Wolfgang Raffelsberger
<[hidden email]> wrote:

> check out the official document
> *R Installation and Administration*
> from https://cran.r-project.org/manuals.html
> There you'll find how to define a specific path for each installation.
>
> (Since a number of years I administrate multiple versions of R at different
> platforms, of course including Linux)
>
> Wolfgang
>
> 2015-10-07 9:04 GMT+02:00 Loris Bennett <[hidden email]>:
>
>> Dear Luca,
>>
>> Luca Cerone <[hidden email]> writes:
>>
>> > Dear all,
>> > on one shared machine we have an older R version installed. Some packages
>> > have known issues with that version that are fixed in newer R versions.
>> >
>> > Since that is a production machine with many jobs running we would like
>> to
>> > keep things as they are. However I would also like to keep advantage of
>> the
>> > newest version and the bug fixes introduced.
>> >
>> > What would be the best way to install a newer version along the one that
>> > already exists? Is it possible to install it for a specific user only?
>> >
>> > Cheers,
>> > Luca
>>
>> If you are on a Unix-like platform, a standard way of dealing with
>> multiple versions of a piece of software installed in parallel is
>> "Environment Modules":
>>
>> http://modules.sourceforge.net/
>>
>> Packages for various Linux distributions are available.
>>
>> You could make a version available for a specific user by setting
>> appropriate file permissions of the module file which is used to set up
>> the environment.  However, I would consider this a somewhat unusual
>> configuration.  If you are worried about people using the wrong version
>> by mistake, you can either have the standard version available without
>> using modules, or you can define a default version within the modules
>> setup.
>>
>> HTH
>>
>> Loris
>>
>> --
>> This signature is currently under construction.
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Installing different R versions

Loris Bennett-2
Dear Luca,

Luca Cerone <[hidden email]> writes:

> Dear Loris and Wolfgang,
> thanks a lot for the help!
>
> I wasn't aware of the module project. I'd rather use the "official"
> way of having co-existent R versions in this case,
> but is a good tool to know!

As far as I can tell from a quick look, "R Installation and
Administration", as referred to by Wolfgang, just tells you how to
install different versions in different places by using the
configuration option --prefix (for Linux at least).  This is some thing
you always have to do, if you want to install several versions in
parallel.

However, once you have multiple versions installed, you need a mechanism
to allow users to choose between them.  This is where Environment
Modules come in.  At the simplest level, they just allow environment
variables to be set and unset in an easy and consistent way.

So it is not a question of "using the 'official' way of having
co-existent R versions", but rather of installing various versions and
then enabling people to choose easily between them.

Or have I missed some intrinsic feature of R which will allow me to
switch between installed versions without having to explicitly tweak
environment variables?

Cheers,

Loris

--
This signature is currently under construction.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Installing different R versions

Martin Maechler
>>>>> Loris Bennett <[hidden email]>
>>>>>     on Thu, 8 Oct 2015 12:07:20 +0200 writes:

    > Dear Luca, Luca Cerone <[hidden email]> writes:

    >> Dear Loris and Wolfgang, thanks a lot for the help!
    >>
    >> I wasn't aware of the module project. I'd rather use the
    >> "official" way of having co-existent R versions in this
    >> case, but is a good tool to know!

    > As far as I can tell from a quick look, "R Installation
    > and Administration", as referred to by Wolfgang, just
    > tells you how to install different versions in different
    > places by using the configuration option --prefix (for
    > Linux at least).  This is some thing you always have to
    > do, if you want to install several versions in parallel.

    > However, once you have multiple versions installed, you
    > need a mechanism to allow users to choose between them.
    > This is where Environment Modules come in.  At the
    > simplest level, they just allow environment variables to
    > be set and unset in an easy and consistent way.

    > So it is not a question of "using the 'official' way of
    > having co-existent R versions", but rather of installing
    > various versions and then enabling people to choose easily
    > between them.

    > Or have I missed some intrinsic feature of R which will
    > allow me to switch between installed versions without
    > having to explicitly tweak environment variables?

Yes, you have missed something.
I have installed many dozen versions of R simultaneously both at
work and on my laptop ... all under Linux.
(Yes, I am extreme - as R Core member wanting to be able to go
 back and see ...)

I don't need any environment variables, but just symbolic links
to define 'R', 'R-devel', 'R-patched', 'R-3.2.2', etc etc. in
our default PATH.
So these work from the shell (or similar), and
even ESS (Emacs Speaks Statistics) is automagically picking up
all these, so I can use
   M-x R
   M-x R-3.2.2
   M-x R-devel
   etc
   
to have different versions of R running simultaneously "inside" ESS.

Martin

    > Cheers,

    > Loris

    > --
    > This signature is currently under construction.
(let's you'll converge ;-)

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Installing different R versions

Loris Bennett-2
Martin Maechler <[hidden email]> writes:

>>>>>> Loris Bennett <[hidden email]>
>>>>>>     on Thu, 8 Oct 2015 12:07:20 +0200 writes:
>
>     > Dear Luca, Luca Cerone <[hidden email]> writes:
>
>     >> Dear Loris and Wolfgang, thanks a lot for the help!
>     >>
>     >> I wasn't aware of the module project. I'd rather use the
>     >> "official" way of having co-existent R versions in this
>     >> case, but is a good tool to know!
>
>     > As far as I can tell from a quick look, "R Installation
>     > and Administration", as referred to by Wolfgang, just
>     > tells you how to install different versions in different
>     > places by using the configuration option --prefix (for
>     > Linux at least).  This is some thing you always have to
>     > do, if you want to install several versions in parallel.
>
>     > However, once you have multiple versions installed, you
>     > need a mechanism to allow users to choose between them.
>     > This is where Environment Modules come in.  At the
>     > simplest level, they just allow environment variables to
>     > be set and unset in an easy and consistent way.
>
>     > So it is not a question of "using the 'official' way of
>     > having co-existent R versions", but rather of installing
>     > various versions and then enabling people to choose easily
>     > between them.
>
>     > Or have I missed some intrinsic feature of R which will
>     > allow me to switch between installed versions without
>     > having to explicitly tweak environment variables?
>
> Yes, you have missed something.
> I have installed many dozen versions of R simultaneously both at
> work and on my laptop ... all under Linux.
> (Yes, I am extreme - as R Core member wanting to be able to go
>  back and see ...)
>
> I don't need any environment variables, but just symbolic links
> to define 'R', 'R-devel', 'R-patched', 'R-3.2.2', etc etc. in
> our default PATH.
> So these work from the shell (or similar), and
> even ESS (Emacs Speaks Statistics) is automagically picking up
> all these, so I can use
>    M-x R
>    M-x R-3.2.2
>    M-x R-devel
>    etc
>    
> to have different versions of R running simultaneously "inside" ESS.

Well, I'm not sure I would consider symbolic links to be an "intrinsic
feature of R" that I have missed.

In a module file I would do, say,

set             root          /nfs/software/R/$version
setenv          R_HOME        $root/lib64/R
prepend-path    PATH          $root/bin

Whilst in many cases setting $R_HOME or $R_PROFILE may not be necessary,
if they are needed, then this becomes a great deal easier with a
mechanism such a environment modules.

Another advantage of environment modules is that, if you compile R
against an external library, such as Intel's MKL or an MPI library, you
can also set up the necessary variables and paths via the module files.

However, in general the modules approach is probably only worthwhile if
you have a lot of software in a lot of different versions, which I do.

Cheers,

Loris

--
This signature is currently under construction.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.