Description Usage Arguments Value Author(s) Examples
Determine a number (k) of points that maximize the areal coverage of a study area using a set of matching variables to determine similarity among sites.
1 | plotcoverage(x)
|
x |
Output from |
Plot of the proportion of the study area covered for each value of k, or if only one value of k was used, reports coverage for that solution.
Rachel R. Renne
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # Load targetcells data for Target Cells
data(targetcells)
#Create data frame of potential matching variables for Target Cells
allvars <- makeInputdata(targetcells)
# Subset to include only matching variables
matchingvars <- allvars[,c("cellnumbers","x","y","bioclim_01","bioclim_04",
"bioclim_09","bioclim_12","bioclim_15","bioclim_18")]
# Create raster_template
raster_template <- targetcells[[1]]
# Create vector of matching criteria
criteria <- c(0.7,42,3.3,66,5.4,18.4)
# Create sequence of values for k
klist = seq(25,100, by = 25)
# Run kpoints algorithm for klist
# Note: n_starts should be >= 10, it is 1 here to reduce run time.
results3 <- kpoints(matchingvars,criteria = criteria, klist = klist,
n_starts = 1, min_area = 50, iter = 15,
raster_template = raster_template, verify_stop = FALSE)
# Find optimal number of points (k)
plotcoverage(results3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.