{
# load in sample data
library(S4DM)
library(terra)
# occurrence points
data("sample_points")
occurrences <- sample_points
# environmental data
env <- rast(system.file('ex/sample_env.tif', package="S4DM"))
# rescale the environmental data
env <- scale(env)
map <- make_range_map(occurrences = occurrences,
env = env,
method = "gaussian",
presence_method = NULL,
background_method = NULL,
bootstrap = "none",
bootstrap_reps = 100,
quantile = 0.05,
background_buffer_width = 100000)
plot(map)
}
Run the code above in your browser using DataLab