Description Usage Arguments Examples
Generate environmental background data is a function similar to sampleRandom function of the raster package but optimized for Ecological niche modeling.
1 2 3 4 5 6 7 8 9 | sample_envbg(
envlayers,
nbg,
nprop = NULL,
coordinates = FALSE,
cellIDs = FALSE,
rseed = NULL,
ncores = 4
)
|
envlayers |
A raster stack or brick. |
nbg |
Number of points for the background data |
nprop |
Proportion of environmental data to be sampled. Default NULL |
coordinates |
Logical. If TRUE cell coordinates will be returned |
cellIDs |
Logical. If TRUE cell IDs will be returned |
rseed |
Random seed number. Default NULL |
ncores |
Number of workers to run the parallel process. |
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
wcpath <- list.files(system.file("extdata/bios",
package = "ntbox"),
pattern = ".tif$",
full.names = TRUE)
envlayers <- raster::stack(wcpath)
vals <- sample_envbg(envlayers,nbg = 3583)
# Using a proportion of data
vals <- sample_envbg(envlayers,nprop = 0.20)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.