Error in loadNamespace while building R-package

104 Views Asked by At

I've got a collection of functions I use that I combine in a local R-package. This works since years. Some of the functions did rely on the packages rgdal, sp, and maptools that are close to their end of life. I managed to edit the function that they use the packages sf and terra instead. However, if I try to build the package using R-Studio and RTools43 I get the error:

> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()),
> versionCheck = vI[[j]]) : 
>      there is no package called 'maptools'

I searched all files in the directory but cannot find any file that relies on maptools. Unfortunately, the only solutions I find suggest to install the missing package, which I don`t want to do, because of the coming EOL status.

In the description file I import the following packages:

IMPORTS:
  xts,
  magrittr,
  R.utils,
  parallel,
  pbapply,
  terra,
  tools,
  data.table,
  hydroGOF,
  sf,
  plyr,
  raster,
  dygraphs,
  htmltools

I know that this is no reproducible example, but I'm not able to give one.

Thanks for any ideas.

0

There are 0 best solutions below