All attempts to upgrade R to 3.5.0 on Linux Mint 18.3 didn't work as (perhaps) there was not this version in the CRAN repository and mirrors, I downloaded and installed 3.5.0 in a directory, and pointed RStudio to it via adding the line
export RSTUDIO_WHICH_R=/usr/bin/R in ~/.profile, as advised in https://support.rstudio.com/hc/en-us/articles/200486138-Changing-R-versions-for-RStudio-desktop.
However, RStudio wouldn't use it, complaining:
R Not Found R shared library (/usr/local/lib/R/lib/libR.so) not found. If this is a custom build of R, was it built with the --enable-R-shlib option?
How do I get RStudio to use this R 3.5.0?