Instructions to get started with R-INLA
To install the stable or testing version of R-INLA, use one of the following commands in R:
install.packages("INLA", repos=c(getOption("repos"), INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)
install.packages("INLA", repos=c(getOption("repos"), INLA="https://inla.r-inla-download.org/R/testing"), dep=TRUE)
To update INLA:
inla.upgrade()
inla.upgrade(testing=TRUE)
Windows users may need to uninstall INLA before reinstalling. For required Bioconductor packages:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(c("graph", "Rgraphviz"), dep=TRUE)
To install alternative Linux builds:
inla.binary.install()
Use the remotes package to install a specific version of INLA that matches your R version:
| R Version | INLA Version | Command |
|---|---|---|
| R 4.5 | 25.04.29 | remotes::install_version("INLA", version = "25.04.29", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/testing"), dep = TRUE) |
| R 4.4 | 24.05.10 | remotes::install_version("INLA", version = "24.05.10", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/testing"), dep = TRUE) |
| R 4.3 | 23.05.30 | remotes::install_version("INLA", version = "23.05.30", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/testing"), dep = TRUE) |
| R 4.2 | 22.05.07 | remotes::install_version("INLA", version = "22.05.07", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/testing"), dep = TRUE) |
| R 4.1 | 22.05.03 | remotes::install_version("INLA", version = "22.05.03", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/testing"), dep = TRUE) |
From version 23.08.18, INLA depends on the fmesher package instead of a standalone binary. For more information, see fmesher on CRAN or the conversion guide.
options(repos=c(
inlabruorg = "https://inlabru-org.r-universe.dev",
INLA = "https://inla.r-inla-download.org/R/testing",
CRAN = "https://cran.rstudio.com"
))
install.packages("fmesher")
Most installation issues arise from using outdated versions of R or INLA. Please ensure you are using:
If issues persist, restart your R session and reinstall using the commands above.