What are some ways I can use R on Alpine?

I use R for class and research but it slows down my laptop. What are some ways I can use it on Alpine?

Great question! One of the easiest ways is to use a conda environment. Anaconda is available on Alpine and allows people to create software environments and you can install different versions of R and some packages. The downside to using conda is that you are likely limited to what packages are available in the conda repositories. A second way is to use a container like singularity which is now called Apptainer. This gives you a custom environment for you to use and install R or whatever packages you’d like. The downside of containers is that you must have root access to build new containers which you won’t have on Alpine. However, there are a large number of pre-built R containers on a website called DockerHub that you can simply pull onto Alpine and start using.
The last way is to install it yourself in your project directory. While entirely possible to do this you may run into issues with system level package dependencies.

Note: In addition to the options noted above – which give you the most control over versioning and package management – two “R” modules were recently installed on Alpine and can be used as follows (depending on your version preference):

module load R/3.6.3
or
module load R/4.2.2

I definitely recommend a conda environment if you are in biosciences. Most packages are task-specific and have to be installed through Bioconductor. A user conda setup (not at the admin level) is the easiest way to accomplish this.