{
# 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)
env_pres <- get_env_pres(coords = occurrences,
env = env)
}
Run the code above in your browser using DataLab