library(terra)
data("fauna_data")
spp <- c("Panthera onca", "Mazama jucunda")
#Get states, countrys and intersection states-countrys of species
spp_spt <- fauna_spat_occ(data = fauna_data, species = spp, state = TRUE,
country = TRUE, verbose = TRUE)
#Plot states with confirmed occurrence of Panthera onca and Mazama jucunda
plot(spp_spt$`Panthera onca`$states)
plot(spp_spt$`Mazama jucunda`$states)
#Plot countries with confirmed occurrence of Panthera onca and Mazama jucunda
plot(spp_spt$`Panthera onca`$countries)
plot(spp_spt$`Mazama jucunda`$countries)
Run the code above in your browser using DataLab