hullinfer {SyNet}R Documentation

Sympatry Inference from Convex Hulls

Description

Realizes all pairwise comparisons of overlapping between species ranges encoded as convex hulls.

Usage

  hullinfer(x)

Arguments

x An object of class dnpoint.

Details

chull is used to obtain the convex hulls.
The internal analysis of geometric overlap is carried out by the function overlaphull.

Value

An object of class hullinference, which is a list with the following elements:

sm An adjacency matrix that reflects the existence (1) or not (0) of a sympatric link between species.
Label A character vector of species labels.
HullVertex List of convex hulls by species. Each main element shows the x and y coordinates of points lying on the convex hulls, in clockwise order.

Author(s)

Daniel A. Dos Santos

Examples

#####
# We create an object of class 'dnpoint' that includes many degeneracies
IDsp <- c(1,1,2,2,3,3,3,4,4,4,4,5,5,5)
Longitud <- c(1,1,3,3,0,4,5.5,1,1,2,2,1.5,3.5,3.5)
Latitud <- c(5,8,0,2,1,7,0,4,9,4,6,2,2,3)
Label <- c("A", "B", "C", "D", "E")
example <- list(Numpoints = 14, Points = data.frame(IDsp = IDsp,
           Longitud = Longitud, Latitud = Latitud), Label = Label)
class(example) <- "dnpoint"
rslt <- hullinfer(example)

#####
# Draw ranges
plot(Longitud, Latitud)
for (i in 1:5) 
  polygon(rslt$HullVertex[[i]], border = i) 


[Package SyNet version 1.0 Index]