[R-sig-Geo] adehabitatHR : object "rgeos" not found

Xavier Giroux-Bougard x.giroux.bougard at gmail.com
Wed Mar 16 18:25:35 CET 2016

Hello everyone,

I am trying to estimate some home ranges using the LoCoH method as
implemented in adehabitatHR, but I am getting some error messages related
to rgeos. Here is some quick code that produces this error:

> require(adehabitatHR)
> require(rgeos)
> require(maptools)
> data("puechabonsp")
> res <- LoCoH.k(puechabonsp$relocs[,1], 10)

so far so good! However, when I use the LoCoH.k.area() function to evaluate
what the choice of K has on the area of the home range estimates,  I get
some error messages informing me that the function produces orphaned holes:

> LoCoH.k.area(puechabonsp$relocs[,1], krange = seq(4 ,15, length = 5),
percent = 100)

Error in rgeos::createPolygonsComment(oobj) : rgeos_PolyCreateComment:
orphaned hole, cannot find containing polygon for hole at index 4

At first I was getting this message on my own relocation data and I thought
I had some funky locations that got through my QA/QC filters, but it is
also as I just showed using the example code in the adehabitatHR vignette.
This leads me to believe that the function itself is building some polygons
that throw this error message.

Any thoughts?

Thanks for your time!



R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets
[6] methods   base

other attached packages:
 [1] maptools_0.8-39  rgeos_0.3-17        adehabitatHR_0.4.14
 [4] adehabitatLT_0.3.20 CircStats_0.2-4
 [6] boot_1.3-17         MASS_7.3-45
 [8] adehabitatMA_0.3.10 ade4_1.7-4
 [10] deldir_0.1-12       sp_1.2-2

loaded via a namespace (and not attached):
[1] tools_3.2.3     foreign_0.8-66  maptools_0.8-39
[4] grid_3.2.3      lattice_0.20-33

	[[alternative HTML version deleted]]

More information about the R-sig-Geo mailing list