iucnn_phylogenetic_features: Extract Phylogenetic Features Based on Phylogenetic...

View source: R/iucnn_phylogenetic_features.R

iucnn_phylogenetic_featuresR Documentation

Extract Phylogenetic Features Based on Phylogenetic Eigenvectors

Description

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.

Usage

iucnn_phylogenetic_features(x, species = "species", phy.eigen)

Arguments

x

a data.frame of species occurrence records including three columns with species name, longitudinal coordinates and latitudinal coordinates (both decimal).

species

a character string. The name of the column with the species names.

phy.eigen

a matrix of phylogenetic Eigenvector calculated from a phylogenetic tree including training and prediction species using the iucnn_prepare_phy function.

Value

a data.frame of phylogenetic features

See Also

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()

Examples

## Not run: 
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)

## End(Not run)

azizka/IUCNN documentation built on March 29, 2024, 9:38 a.m.