Trouble installing the package geoR (Windows)

it seems that the package "geoR" was removed from the repository.

So after trying to install it manually with:

install.packages(file.choose(), repos=NULL, type="source")
Installing package into "geoR_1.8-1.zip"(as ‘lib’ is unspecified)package 'geoR' successfully unpacked and MD5 sums checkedError in utils:::unpackPkgZip(pkg, pkg_name, lib, libs_only, lock, reuse_lockdir = reuse_lockdir) :package 'geoR' not installed because it is not built for UCRTWarning in install.packages :installation of package ‘geoR_1.8-1.zip’ had non-zero exit status

I have the latest version of R (4.2.0).
So I’ve tried another command:

install.packages("geoR_1.8-1.zip", repos = NULL, type = "win.binary")
Installing package into ‘libpath’(as ‘lib’ is unspecified)package ‘geoR’ successfully unpacked and MD5 sums checkedError in install.packages : package ‘geoR’ not installed because it is not built for UCRT

So how do I make it work?

I’ve already tried to uninstall R, Rstudio, Rtools42 and all the folders associated…
After a long try, I came up with this:

If I try to install an older version of geoR,

install.packages("geoR_1.7-5.2.tar.gz", repos = NULL, type = "source")

Installing package into ‘C:/Users/.../AppData/Local/R/win-library/4.2’

(as ‘lib’ is unspecified)

ERROR: dependencies 'splancs', 'RandomFields' are not available for package 'geoR'

* removing 'C:/Users/..../AppData/Local/R/win-library/4.2/geoR'

Warning in install.packages :

installation of package ‘geoR_1.7-5.2.tar.gz’ had non-zero exit status

So this seems a dependancies issue, and after installing splancs correctly, RandomFields (manually because there is no repository for it) give me this output after a long string (maybe the compilation):

make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:257: brownresnick.o] Error 1
ERROR: compilation failed for package 'RandomFields'
* removing 'C:/Users/.../AppData/Local/R/win-library/4.2/RandomFields'
Warning message:
In install.packages(file.choose()) :
  installation of package ‘C:/Users/rmish/Downloads/RandomFields_3.3.tar.gz’ had non-zero exit status

Somebody wants to help me?

Thanks in advance, I’m really stuck.

>Solution :

Both RandomFields and geoR are no longer available on CRAN, so you’ll have to download their respective tar files. You’ll also need to install the splancs package, which is available on CRAN.

install.packages("splancs") 

Download the two other packages here:

http://www2.uaem.mx/r-mirror/src/contrib/RandomFields_2.0.66.tar.gz

https://cran.r-project.org/src/contrib/Archive/geoR/geoR_1.8-1.tar.gz

Install RandomFields first:

install.packages("C:/path/to/RandomFields_2.0.66.tar.gz", repos = NULL, type = "source")

And then geoR:

install.packages("C:/path/to/geoR_1.8-1.tar.gz", repos = NULL, type = "source")

Leave a Reply