data(africa)
library(terra)
p <- vect(system.file("ex/sa.json", package = "phyloregion"))
x <- EDGE(africa$IUCN, africa$phylo, Redlist = "IUCN",
species = "Species")
y <- map_trait(africa$comm, x, FUN = sd, pol = p)
plot(y, "traits", col = hcl.colors(n=20, palette = "Blue-Red 3", rev=FALSE))
Run the code above in your browser using DataLab