R, RStudio and other R IDEs


#1

The purpose of this topic is to serve as a guideline to install R and RStudio. I started a new topic because a forum search didn’t reveal any such guides and as I’d been having some trouble with this, I thought it might help someone (or me!) to have a topic.

My installation issue may be related to update issues I had, but nevertheless a terse guide to get up and running with R might be useful.

Step by step installation - what I have so far

Note that this may not be entirely accurate. The general idea seems to be:

  1. Install R.
  2. Install RStudio.
  3. Install packages.

What I’ve tried so far is the following:

  1. Install R. This can be done in a few ways, so pick one from their website: How can R be installed

  2. Install RStudio. There is a binary available for RStudio so you can just install it via pacman. Find the binary page here: rstudio-desktop-bin. You can also install from source, in which case a link to the source tarball is available on that link too.

  3. Install packages (optional). I tend to install packages as I need them and I messed up the steps, so my RStudio was installed but I didn’t install R first. This means that my IDE didn’t do much. Ewps.

Hope this helps someone. This information is available, but it’s a bit all over the place so now it is here all in one place. I’ll be trying this after my updates and I’ll give some feedback as to how I managed.


#2

OK I am finally done with step 1. Had some dependency issues and my repositories are still doing strange things, but I managed to get R installed via pacman as follows:

sudo pacman -S r

Now I get R to run perfectly fine from the terminal, but for some reason RStudio isn’t installing. I suspect it’s a repository issue, though.

Before that, I tried to install from source, but since I’m still an arch linux noob, the user rights weren’t correct and then the environment variables weren’t set up correctly. Much easier from the packages.


#3

Finally, done with Step 2. Not sure why it took me so long to get this, but in Arch Labs, there are two separate places from where you can install things.

The first place is via pacman, which is ordinary packages. This is the first section of the pacli utility, namely options 1 to 8 as it currently stands.

The second place is via AUR, which may be common knowledge to the rest, but to an arch labs noob like me, this is news. AUR seems to be for binary packages, which are supported by other distros, but packaged for Arch Labs.

RStudio can be installed from source, but it’s a headache. It’s easier to follow these steps. Remember that R is assumed to be installed already at this point. If you haven’t installed R, install that first:

  1. Fire up pacli.
  2. Select 21 Search and install from AUR. I suppose other options might work too, but this is the one I used.
  3. Type in RStudio to see which options you have.
  4. Choose your selection from the list. I chose to install rstudio-desktop-bin by selecting its number from the list.

Simple as that!


Totally frustrated with this beautiful fast linux distro! (updated title 12 hours later: "Not frustrated anymore, :-), loving it")
#4

I installed R and RStudio today as well. I followed the different instructions on the Arch wiki and it worked like a charm.
I installed r via pacman -S r. Then I went and git clone'd the AUR files, makepkg'd and finally pacman -U'd them (all steps expertly described in the arch wiki). Started RStudio, installed tidyverse as a test, which also worked just fine.
The whole thing took me around 20minutes. No pacli needed. Also no additional steps needed (lots of tweaks and alternatives on the arch wiki but luckily none of them neccessary for me here).

I just felt like maybe I should state this here so that potential new users using R or RStudio don’t feel like it’s a herculean task.


#5

Thanks for the info! Yes, my longwinded tutorial may make it appear as if it’s a Herculean task, but it’s really not.

It seems that the key starting point is installing R first. From there, either pacli or building from source works.


#6

Thought I’d highjack this thread here to let ppl know that over the weekend I found out that starting Rstudio v 1.2 (currently in “preview” status but also available from the AUR) there will be “real” custom theme support (source: rstudio.github).
Also, I found a Nord color scheme based theme on github by a user named janusvm (click here). It fits the standard archlabs color scheme perfectly (as this is also based on Nord as far as I can tell?).