Brder
Brder

Reputation: 35

Can't load geoR package (R, library())

For a project in university, I need to install a package which depends on geoR. Unfortunately, I can't load the package with library(geoR). The installation is not a problem. I've tried to uninstall and install the package and updated R. It still loads "forever". It is particularly strange since I can easily load any other installed package with library(...). Since I don't get any error message in the console, I'm very frustrated and have no idea how to solve this issue. I use Mac OS X 10.14.4. I'm using RStudio Version 1.1.463.

The installation seems to be no problem:

> install.packages("geoR")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/geoR_1.7-5.2.1.tgz'
Content type 'application/x-gzip' length 1544028 bytes (1.5 MB)
==================================================
downloaded 1.5 MB


The downloaded binary packages are in
    /var/folders/cn/p44ynxg91mq7_ld8qrllxtx80000gn/T//RtmpGJbn5O/downloaded_packages
> library(geoR)

After the library call, a never-ending process starts. Is there a way to track the library call? I haven't found any proper solution online. Since it loads forever, the only thing I can do is to force quit R Studio. I've tried to load it in R as well, it didn't work either. I've also tried to delete the (installed geoR)-folder manually in library/Frameworks/r.framework/..., it didn't help as well.

Upvotes: 2

Views: 2773

Answers (2)

mhoehle
mhoehle

Reputation: 48

I ran into a similar problem on my Mac OS running 12.5.1 (Monterey) and R version 4.2.3. Was able to track the error to problems loading the tcltk package, which geoR is using.

This command was able to hang my R session:

> tcltk::tcl("info", "tclversion")

Going through the docs show that tcltk needs X11 support. When I updated the XQuartz app from https://www.xquartz.org/ to a newer version (from 2.7.X -> 2.8.5) the above command did not hang the R session anymore:

> tcltk::tcl("info", "tclversion")
<Tcl> 8.6 

and then calling

> library(geoR)

also worked.

So try to update your XQuartz App https://www.xquartz.org/ to the newest version.

Upvotes: 2

user10434643
user10434643

Reputation:

Try installing an older version using devtools:

remove.packages("geoR")
install.packages("devtools")
require(devtools)
install_version("geoR", version = "1.7-4.1", repos = "http://cran.r-project.org")
options(gsubfn.engine = "R")
library(geoR, verbose = TRUE)

Upvotes: 3

Related Questions