0

I got following error whie executing the code.

Code:install.packages("ithir", repos="http://R-Forge.R-project.org")

Error:

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/cloud-user/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
installing the source package ‘ithir’

trying URL 'http://R-Forge.R-project.org/src/contrib/ithir_1.0.tar.gz'
Content type 'application/x-gzip' length 4534681 bytes (4.3 MB)
downloaded 4.3 MB

* installing *source* package 'ithir' ...
** using staged installation
** R
** data
** byte-compile and prepare package for lazy loading
Error: objects 'ripras', 'as.ppp', 'delaunay' are not exported by 'namespace:spatstat'
Execution halted
ERROR: lazy loading failed for package 'ithir'
* removing 'C:/Users/cloud-user/AppData/Local/R/win-library/4.2/ithir'
Warning in install.packages :
  installation of package ‘ithir’ had non-zero exit status

I was trying to install a package ithir.

2 Answers2

0

The error message says in the first line that you will need to install Rtools before you can build packages. Visit CRAN.r-project.org for information about installing Rtools.

Adrian Baddeley
  • 2,534
  • 1
  • 5
  • 8
0

According to https://r-forge.r-project.org/R/?group_id=2000 the package you are trying to install was last updated in 2016. Since then spatstat was split into many smaller packages due to requirements from the package repository CRAN. Thus ithir as found on that site tries to call functions in spatstat which are now in e.g. spatstat.geom. If you want to use such an old package you also need old versions of other packages. You can find old versions of spatstat that may work with this package at: https://cran.r-project.org/src/contrib/Archive/spatstat/

Edit: I just noticed that ithir seems to be moved to bitbucket and no longer depends on spatstat. You should probably install it from here: https://bitbucket.org/brendo1001/ithir/

Ege Rubak
  • 4,347
  • 1
  • 10
  • 18