Running R on Linux is better in some cases as you have a full build environment for packages. These are compiled from C/Fortran. If you have software engineers in house this allows any mods to be made to source code if you need it.
I use Linux Mint 19.1 which is based on Ubuntu 18.04.
To install the latest version of R at the time of writing 3.6.0 I used the following steps:
Add a repo to my
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
Note this is specific to the Ubuntu base packages I have. If on a different version of Ubuntu you can check the correct repo here
From a terminal run
sudo apt-get update sudo apt-get install r-base r-base-dev
There are some extra libraries to install for common packages hence run these commands:
sudo apt-get install libssl-dev libxml2-dev libcurl4-openssl-dev unixodbc unixodbc-dev libiodbc2-dev libmyodbc odbc-postgresql
Once downloaded install the package with your package manager.
To get started with R I recommend installing tidyverse. This is a collection of packages to make data science easier.
Open up R Studio and run
This will take a while as a number of packages have to be downloaded and built.
- If you need to talk to databases over ODBC install RODBC with
- Another package I recommend is Shiny. This app lets you write web apps for your R code to be used by non-techies. Run
This should get you a good clean install with a base set of packages.