if (FALSE) {
# Load required libraries
library(raster)
# Example with sample data
uicn <- readRDS(system.file("extdata/uicn.rds",package = "bamm"))
sudam <- readRDS(system.file("extdata/suam.rds",package = "bamm"))
# Convert to PAM with 0.5 degree resolution
pam_result <- bamm::pol2pam(poly = uicn,
taxon_attribute = "binomial",
resolution = 0.5,
polymask = NULL)
# With masking polygon
pam_masked <- pol2pam(poly = uicn,
taxon_attribute = "binomial",
resolution = 0.5,
polymask = sudam)
}
Run the code above in your browser using DataLab