View source: R/1.1.f.data.prep.R
set_calibarea_b | R Documentation |
This function will use a list of coordinates of species occurence data and create minimum convex polygons for each element in the list. It is possible to create concave or convex polygons, create several small polygons based on clusters of points.
set_calibarea_b(
spp.occ.list,
k = 1,
c.m = "AP",
r = 2,
q = 0.3,
distance = "euclidean",
min.nc = 2,
max.nc = 20,
method = "mcquitty",
index = "all",
alphaBeale = 0.1,
convex = T,
alpha = 10,
plot = F,
save = T,
save.pts = F,
numCores = 1,
crs.set = "+proj=longlat +datum=WGS84"
)
spp.occ.list |
A named list of species occurence points, either as "data.frame" or "SpatialPoints"/"SpatialPointsDataFrame" |
k |
number of polygons to create based on coordinates |
c.m |
clustering method to find the best number of clusters (k). Currently E (Elbow) or (Affinity Propagation). |
r |
exponent (see details below) |
q |
if |
distance |
the distance measure to be used to compute the dissimilarity matrix. This must be one of: "euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski" or "NULL". By default, distance="euclidean". If the distance is "NULL", the dissimilarity matrix (diss) should be given by the user. If distance is not "NULL", the dissimilarity matrix should be "NULL". |
min.nc |
minimal number of clusters, between 1 and (number of objects - 1) |
max.nc |
maximal number of clusters, between 2 and (number of objects - 1), greater or equal to min.nc. By default, max.nc=15. |
method |
type of distance measure to be used; for |
index |
the index to be calculated. This should be one of : "kl", "ch", "hartigan", "ccc", "scott", "marriot", "trcovw", "tracew", "friedman", "rubin", "cindex", "db", "silhouette", "duda", "pseudot2", "beale", "ratkowsky", "ball", "ptbiserial", "gap", "frey", "mcclain", "gamma", "gplus", "tau", "dunn", "hubert", "sdindex", "dindex", "sdbw", "all" (all indices except GAP, Gamma, Gplus and Tau), "alllong" (all indices with Gap, Gamma, Gplus and Tau included). |
alphaBeale |
significance value for Beale's index. |
convex |
Logical. Convex (T) or concave (F) polygon |
alpha |
Value of |
plot |
logical. Plot results or not? |
save |
Should save polygons on disk? |
save.pts |
logical. Save each species' occurence points as shapefile? |
numCores |
Number of cores to use for parallelization. If set to 1, no paralellization is performed |
crs.set |
set the coordinate reference system (CRS) of the polygons |
set_calibarea
, split_poly
, NbClust
#' @return A named list of spatial polygons built using coordinates
## Not run:
Bvarieg.occ <- read.table(paste(system.file(package="dismo"),
"/ex/bradypus.csv", sep=""), header=TRUE, sep=",")
colnames(Bvarieg.occ) <- c("SPEC", "LONG", "LAT")
spp.occ.list <- list(Bvarieg = Bvarieg.occ)
occ.polys <- set_calibarea_b(spp.occ.list)
occ.polys <- set_calibarea_b(spp.occ.list, convex=TRUE, alpha=10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.