Skip to content

Commit

Permalink
Linux/mac fix for setup (#178)
Browse files Browse the repository at this point in the history
* update setup for system deps

* edit wording to make more generic

* Update setup.md

---------

Co-authored-by: Alan O'Callaghan <[email protected]>
  • Loading branch information
mallewellyn and alanocallaghan authored Apr 4, 2024
1 parent fb892c8 commit 1bd1447
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@ to set up for the lessons. This should take about an hour to run, depending on
the speed of your computer, your internet connection, and any packages you have
installed already. You'll need to install R 4.0 or later.

The following code will download the data and install the libraries
used in the current version of this lesson:
R usually enables package downloads using pre-built binaries. Some times, this is not possible,
particularly on Linux and Mac systems. In this case, R package installation often requires additional
system dependencies. If you are a Linux user, to ensure that you can download packages using the code
below, first run the terminal commands for your distribution
[here](https://docs.posit.co/connect/admin/r/dependencies/).
Note that you will need to use root access (sudo) to install the system dependencies.
Mac users may need to use [homebrew](https://brew.sh/) to install system dependencies,
and Windows users may need to install [RTools](https://cran.r-project.org/bin/windows/Rtools/).
Ideally, installing packages will proceed without error and you can ignore these steps,
but this isn't always the case.

Previous learners have reported issues with **`igraph`**. Installation instructions for this package can be found on [https://r.igraph.org/](https://r.igraph.org/),

All learners should then run the following code to download the data and install the libraries
used in this lesson:

```r
install.packages("BiocManager")
Expand Down Expand Up @@ -41,17 +54,4 @@ for (file in data_files) {
}
```

On Linux systems, part of the above may fail due to the **`bluster`** package and you may receive error messages after running `BiocManager::install(table[[1]])`, indicating that the package `igraph` was not installed successfully.

Detailed installation instructions for `igraph` can be found at [https://r.igraph.org/](https://r.igraph.org/), but the following workaround code may resolve the issue:

```r
install.packages('igraph', repos=c(igraph = 'https://igraph.r-universe.dev',
CRAN = 'https://cloud.r-project.org'))

BiocManager::install('bluster')
```

Note especially the C libraries that are mentioned on the `igraph` help page for compiling from source --- these are usually available via a package manager (homebrew, apt, pacman, etc), and are required if your R installation is unable to use pre-compiled binaries from CRAN.

{% include links.md %}

0 comments on commit 1bd1447

Please sign in to comment.