2

I need to install R-INLA on R 4.1.1 (Windows 10). I cannot update the R version due to compatibility issues of the newer R installations with other tools I that use. I tried the line:

remotes::install_version("INLA", version="22.05.03",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/testing"), dep=TRUE)

As recommended on the INLA website for R 4.1. I get this message in return:

* installing *binary* package 'INLA' ...
cp: unknown option -- )
Try '/usr/bin/cp --help' for more information.
ERROR: installing binary package failed
* removing 'C:/Program Files/R/R-4.1.1/library/INLA'

I have rtools40 installed and added to my path. I have installed the two suggested packages graph and Rgraphviz as recommended.

I have also tried:

devtools::install_github(repo = "https://github.com/hrue/r-inla", ref = "stable", subdir = "rinla", build = FALSE)

But no luck there either.

If I type where cp in the RStudio terminal, I get:

$ where cp
C:\Program Files\Git\usr\bin\cp.exe
C:\rtools40\usr\bin\cp.exe

But I am not sure if this has anything to do with R not finding cp.

Anyone has any advice?

somros
  • 21
  • 2

1 Answers1

3

I was having the same problem, and solved it for my Windows 10 machine:

Download the INLA_22.05.03.zip file at https://inla.r-inla-download.org/R/stable/bin/windows/contrib/4.1/

In RStudio, under the Tools menu, select Install Packages, and Install from: Package Archive File. Tell RStudio where the .zip file is located on your local machine. From there it installed fine for me.

almccombs
  • 31
  • 2