change R version
link is from
https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R
default R adress: $which R
/usr/bin/R
it can be
Force R Studio use the specific version:
export RSTUDIO_WHICH_R=/usr/local/bin/R