##load data
data(dataset.all.species)
data(dataset.landwater)
##create grid parameters
dimension <- getDimension(dataset.all.species, resolution=1)
shift <- getShift(dataset.all.species)
##create landwatermask
landwatermask.nocoast <- createLandwatermask(dataset.landwater,
dimension, shift, resolution=1)
##estimate species richness
species.richness.weighted <- species.richness(dataset.all.species,
landwatermask.nocoast, weight=0.5, dimension, shift, resolution=1,
upperbound=5, narrow.endemic=FALSE, narrow.endemic.limit=5,
parallel=FALSE, all.species=1:20)
##prepare clustersearch
clusterlimit <- 100
##adjust species richness
clusterlist <- searchClusters(species.richness.weighted,
dimension, shift, resolution=1, clusterlimit)Run the code above in your browser using DataLab