R/iucnn_phylogenetic_features.R
iucnn_phylogenetic_features.Rd
Extract features for a list of species based on phylogenetic Eigenvectors
prepared with the iucnn_prepare_phy
function.
Tip labels need to match the species names in x.
iucnn_phylogenetic_features(x, species = "species", phy.eigen)
a data.frame of species occurrence records including three columns with species name, longitudinal coordinates and latitudinal coordinates (both decimal).
a character string. The name of the column with the species names.
a matrix of phylogenetic Eigenvector calculated
from a phylogenetic tree including training and prediction species
using the iucnn_prepare_phy
function.
a data.frame of phylogenetic features
Other Feature preparation:
iucnn_bias_features()
,
iucnn_biome_features()
,
iucnn_climate_features()
,
iucnn_cnn_features()
,
iucnn_footprint_features()
,
iucnn_geography_features()
,
iucnn_prepare_features()
,
iucnn_prepare_phy()
if (FALSE) {
dat <- data.frame(species = c("A","B", "X"),
decimallongitude = runif(180,10,15),
decimallatitude = runif(180,-5,5))
tree <- ape::rphylo(n = 10, birth = 0.1, death = 0)
tree$tip.label <- LETTERS[1:10]
phy <- iucnn_prepare_phy(phy = tree)
iucnn_phylogenetic_features(x = dat,
phy.eigen = phy)
}