Description Usage Arguments Details Value Examples
output config layers as rasterStack
1 | configStack(env.stack, config)
|
env.stack |
a |
config |
config is a |
This method will extract rasterLayer acorrding to config, then output rasterStack as result
rasterStack
object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # load the sdmvspecies library
library("sdmvspecies")
library("raster")
# find package's location
package.dir <- system.file(package="sdmvspecies")
# let see where is our sdmvspecies is installed in
package.dir
# find env dir under the package's location
env.dir <- paste(package.dir, "/external/env/", sep="")
# let see env dir
env.dir
# get the environment raster file
env.files <- list.files(env.dir, pattern="*.bil$", full.names=TRUE)
# see the file list
env.files
# put the environment file in a raster stack,
# which require all the environment should have same resolution and extend
env.stack <- stack(env.files)
# let see the env.stack var
env.stack
# here let's configure the environment response function and weight
config <- list(c("bio1", "1", 0, 100), c("bio11", "2", -100, NULL))
env.stack <- configStack(env.stack, config)
plot(env.stack)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.