Skip to content

Commit

Permalink
adding udunits for INLA #125
Browse files Browse the repository at this point in the history
  • Loading branch information
j-i-l committed Jul 11, 2024
1 parent a4d3b87 commit 361d512
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/onlabel_Fedora_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ jobs:
# run: |
# autoconf

- name: install INLA dependencies
run: |
dnf -y install udunits2-devel
- name: install INLA
run: |
install.packages("INLA", repos = c(CRAN = "https://cran.r-project.org", INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE)
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/onlabel_Macos_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
library("rjags")
shell: Rscript {0}

- name: install INLA dependencies
run: |
brew install udunits
- name: install INLA
run: |
install.packages("INLA", repos = c(CRAN = "https://cran.r-project.org", INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE)
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/onlabel_Ubuntu_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ jobs:
library("rjags")
shell: Rscript {0}


- name: install INLA dependencies
run: |
sudo apt-get install -y --no-install-recommends libudunits2-dev
- name: install INLA
run: |
install.packages("INLA", repos = c(CRAN = "https://cran.r-project.org", INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE)
Expand Down
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,41 @@ Below is a list of these dependencies with details on how to install and configu
`anb` uses INLA to fit some models.

### Installation

INLA needs the [UDUNITS](https://www.unidata.ucar.edu/software/udunits/) C library which needs to be installed first:

- <details>
<summary>Ubuntu</summary>

Install it with:

```bash
apt-get install --no-install-recommends libudunits2-dev
```

</details>

- <details>
<summary>Fedora</summary>

Install it with:

```bash
dnf -y install udunits2-devel
```

</details>

- <details>
<summary>Macos</summary>

Install it with:

```bash
brew install udunits
```

</details>

The installation is straight forward on common platforms, simply start an R session and run:

Expand Down

0 comments on commit 361d512

Please sign in to comment.