Define “M” under different ways is matter to calibration models in ecological niche model, we used buffer zone as calibration zone, based on:
These function help you to reduce environmental.
library(sdStaf)
#> Loading required package: dplyr
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
#> Loading required package: ggplot2
data(phytotoma)
Now, we need to load environmental dataset.
library(dismo)
#> Loading required package: raster
#> Loading required package: sp
#>
#> Attaching package: 'raster'
#> The following object is masked from 'package:dplyr':
#>
#> select
predictor <- stack(list.files(path=paste(system.file(package="dismo"),'/ex', sep=''), pattern='grd', full.names=TRUE ))
# Read names
names(predictor)
#> [1] "bio1" "bio12" "bio16" "bio17" "bio5" "bio6" "bio7" "bio8" "biome"
plot(predictor$bio1)
Next function, reduce environmental data based on buffer zone and customer zone.
reduce_cut <- reduce.env(env = predictor, occ_data = phytotoma[,2:3], mask= buf.M)
#> Environmental data completed in 0 minutes 0.4 seconds.
plot(reduce_cut@cropa$bio1)
points(phytotoma[,2:3], pch=16,col='blue')
We need to show correlogram of predictor variables
Remove Rd
in reduce_cut
, and we have these variables.
Define new environmental dataset (no-correlation)