The Rfuncs Project
Installing R and RStudio on (Debian) Linux
I used Unix a lot from 1989-2007, but was never close to being a Unix systems manager. That said, here's how I installed Linux within Oracle's VirtualBox (free) for the Mac. Everything I know about this (not much) is contained in this page. In other words, I admit to being worse than worthless in diagnosing and treating most problems in this area. Then again, if you are a Linux user, you are almost surely far more savvy than me about it.
Linux comes in many flavors. Of the four I sampled, I liked Debian (free) best. I think the way I installed R and RStudio may apply well to other Linux distributions.
As per running raw Unix commands within Mac OS X, everything is done through the command-line interface tool, Terminal.
Become a SuperUser!
To install new applications, you need to get "root" access.
...$ su
Password: <root password>
When the prompt changes to something like
root...#
then you have SuperUser powers!
Linux comes in many flavors. Of the four I sampled, I liked Debian (free) best. I think the way I installed R and RStudio may apply well to other Linux distributions.
As per running raw Unix commands within Mac OS X, everything is done through the command-line interface tool, Terminal.
Become a SuperUser!
To install new applications, you need to get "root" access.
...$ su
Password: <root password>
When the prompt changes to something like
root...#
then you have SuperUser powers!
Installing R
Installing R was straightforward for me. Following the instructions at https://rweb.crmda.ku.edu/cran/bin/linux/debian/, I entered
root...# apt-get update
root...# apt-get install r-base
These spawned a barrage of arcane messages; neverthess, the familiar R logo became nested within the Activities menu ready to click-start R.
Updating R
A few months later, I tried to install the latest version of R. I repeated the "apt-get" commands immediately above, but Linux/Debian told me that "r-base is already the latest version". After a couple of frustrating hours I came to understand, or so I think, that the Debian site does not stay current with R. The workarounds I found were too mysterious for me to pursue this any further. But if you are Linux savvy, it may not be a problem.
Installing RStudio
Surprisingly, I never succeeded in finding instructions that worked (for me) on how do to install Rstudio desktop. After numerous hunches proved wrong, I finally succeeded as follows.
From https://www.rstudio.com/products/rstudio/download/, I clicked on the correct version of RStudio desktop for Debian Linux:
Thus on 27 February 2016, the filename appropriate for Debian Linux was rstudio-0.99.891-amd64.deb. To install it, I used
root...# apt-get install gdebi-core
root...# wget https://download1.rstudio.org/rstudio-0.99.891-amd64.deb
root...# gdebi rstudio-0.99.891-amd64.deb
After these commands did their wizardry, the familiar RStudio logo became nested within the Activities menu ready to click-start RStudio, which also starts R.
Relinquishing SuperUser Powers
root...# exit
root...# apt-get install gdebi-core
root...# wget https://download1.rstudio.org/rstudio-0.99.891-amd64.deb
root...# gdebi rstudio-0.99.891-amd64.deb
After these commands did their wizardry, the familiar RStudio logo became nested within the Activities menu ready to click-start RStudio, which also starts R.
Relinquishing SuperUser Powers
root...# exit