• Uncategorized

About r : Run-R-online-in-Linux-environment-closed

Question Detail

Is there a way (perhaps a website) where one can run R online in a Linux environment?

motivation: I develop a few packages in R and oftentimes I need to run tests in Linux. However, I use a Windows OS and don’t want to go through the hassle of learning Linux to install it locally.

Question Answer

A few suggestions:

  1. Install docker to be able to have a ‘virtual’ Linux on your windows computer. That is essentially unlimited use on your own machine allowing you to learn and test.

  2. You can also go to rstudio.cloud to run a few hours of R within RStudio (Cloud) per month for free. If you need more hours, you can purchase them. Possibly easiest immediate approach but with a usage cap.

  3. Similarly Google Colab has an ability to run R in the notebooks, but it still somewhat hidden. One source with tips is this SO answer.

  4. If you want to / can test in batch mode, then RHub is good. There is also a CRAN package rhub to interact with it. You need to create a token; this is documented.

  5. Last but not least CI providers let you run on their systems. GitHub Actions is popular and supports many operating systems and variants. GitLab had something similar much earlier too. My r-ci setup aims to facilitate this without tieing you to a CI provider “forver”. If you just want GitHub Actions, follow one of the many tutorials for it.

Both Rstudio cloud and rdrr.io/snippets use linux (according to Sys.info())

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.