##load data
data(dataset.all.species)
data(dataset.landwater)
##create grid parameters
dimension <- getDimension(dataset.all.species, resolution=1)
origin <- getOrigin(dataset.all.species)
##create landwatermask
landwatermask.nocoast <- createLandwatermask(dataset.landwater,
dimension, origin, resolution=1)
##estimate species richness
species.richness.weighted <- species.richness(dataset.all.species,
landwatermask.nocoast, distances=1:5, weight=0.5, dimension,
origin, resolution=1, upperbound=3000, all.species=1:2)
##create image
if (FALSE) {
image.success <- createImage(species.richness.weighted, landwatermask.nocoast,
image.title="Test", directory=getwd(), filename="species.richness.test01.png",
origin, parts=10, resolution=1)
print(image.success)
}
Run the code above in your browser using DataLab