/
Install new R version on worker machines

Install new R version on worker machines

The problem

We committed to build the R client for 2 latest R <major>.<minor> version. However the latest R release version (3.5) is inconsistent across platform:

  • On Ubuntu, the instruction to install the latest R version gives users R version 3.4.4. This is because the people who manages the artifacts for Ubuntu have not update their artifacts to R 3.5. 
  • On Mac, installing R version 3.5 corrupted R version 3.4. Re-installing R version 3.4 removed R version 3.5.

Also, CRAN notes that: "CRAN does not have Mac OS X systems and cannot check these binaries for viruses." 

Proposal

The proposal to solve the problem above is to install from source for all 3 platforms: Linux, Mac, and Windows.

Ubuntu Instructions

  • Get the R source from https://cran.r-project.org/ under "R source" link on the left panel.

    Download R source on Ubuntu
    wget https://cran.r-project.org/src/base/R-3/R-3.5.0.tar.gz
  • Unpack the zip file:

    Unzip
    tar -xf R-3.5.0.tar.gz
  • Compile the source code:

    Compile
    ./configure
    make
  • Then check the built system works correctly by

    check
    make check
  • Then install

    install
    sudo make install rhome=/usr/local/R/R-3.5.0
  • Make link for R <major>.<minor> 

    make link
    sudo ln -s R-3.5.0 R-3.5
  • Update the alternatives for R:

    update alternatives
    sudo update-alternatives --install /usr/local/bin/R R /usr/local/R/R-3.5/bin/R 50 --slave /usr/local/bin/Rscript Rscript /usr/local/R/R-3.5/bin/Rscript
    sudo update-alternatives --set R /usr/local/R/R-3.5/bin/R
    
    # to view all alternatives
    update-alternatives --config R
    
    # to fix broken links
    yes '' | sudo update-alternatives --force --all

Mac Instructions


Windows Instructions

Related content

How to install the Synapse R Client
How to install the Synapse R Client
More like this
R Client Developer Bootstrap
R Client Developer Bootstrap
More like this
Notes on setting up EC2 instance to build rSynapseClient
Notes on setting up EC2 instance to build rSynapseClient
More like this
PythonEmbedInR Developer Bootstrap
PythonEmbedInR Developer Bootstrap
More like this
Updating the Python client version in the synapser package
Updating the Python client version in the synapser package
More like this
Developing and maintaining synapser and synapser
Developing and maintaining synapser and synapser
More like this