Installing INLA package

Dear all

I am using RStudio version 4.5.0 and I am trying to install INLA package and I keep on getting an error.

I used this R-studio:

install.packages("INLA",repos=c(getOption("repos"),INLA="Index of /R/stable"), dep=TRUE)
install.packages("INLA",repos=c(getOption("repos"),INLA="Index of /R/testing"), dep=TRUE)

inla.upgrade() # for the stable version
inla.upgrade(testing=TRUE) # for the testing version

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(c("graph", "Rgraphviz"), dep=TRUE)

inla.binary.install()

library("devtools")
devtools::install_github(repo = "GitHub - hrue/r-inla: This is the public repository for the r-inla project", ref = "stable", subdir = "rinla", build = FALSE)

install.packages("INLA",
repos = c(getOption("repos"),
INLA = "Index of /R/stable"),
type = "source",
dep = TRUE)

Thank you advanced

You should be able to use:

install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)

What error message did you get / do you get running that?

This is what I get:
install.packages("INLA",repos=c(getOption("repos"),INLA="Index of /R/stable"), dep=TRUE)
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

Installing package into ‘C:/Users/daniel/AppData/Local/R/win-library/4.5’
(as ‘lib’ is unspecified)

I have updated my RStudio more that ones, but still have issues

As the error says, you need to install Rtools - this is different to Rstudio and is not an R package (i.e. you can't install from R). Once you've installed Rtools, it should work.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.