How to install r and r studio

I’m moving on to installing r on my new librem (the system for statistical computation and graphics).
As a mac user in the past, as I recall from two years ago, I clicked a few icons, one to download, one to install and I was done (maybe twice for r and r studio).
Now r is asking me which of the version of linux I have. https://cran.r-project.org/, redhat, debian, suse or ubuntu. Which one do I need? The whole process looks a little more complicated.
Thanks.

I can’t promise it will go flawlessly, but PureOS is based on Debian, so I would try the Debian version.

You can ultimately download the source and compile it yourself, but that’s probably not something you’d like to try.

Thanks, you have hit the nail on the head.

The Debian instructions said to enter
apt-get update
But I didn’t have permission for that, but the following from the ubuntu instructions seems to be work nicely (it said those are based on Debian anyway).

sudo apt-get update

enter my password
sudo apt-get install r-base

So that’s r installed, now I need RStudio, a project for later.

1 Like

You can download RStudio from their downloads page.
Make sure you download the latest .deb installer. As of the writing of this post it is RStudio 1.1.447 - Ubuntu 16.04+/Debian 9+ (64-bit).

Then open a terminal (called Tilix on PureOS), and set your current directory where you downloaded the .deb (most probably your downloads directory) by typing the following command in your terminal : cd ~/Downloads

Then install the .deb package: sudo dpkg -i rstudio*.deb

And if you don’t want to use Tilix, you should be able to install the .deb file using the default “Software” program. Double-clicking the .deb should even automatically open “Software” to install it.

Thanks, that did the trick.i.e. knowing which of the five or so linux versions to download was great. And, after editing tilix preferences as prompted by tilix shell, sudo dpkg … etc. worked nicely. After a restart r studio is working fine. (The restart was probably needed for other general problems).