| Title: | Phylogenetic Flow Objects for Easy Manipulation and Modelling of Data on Phylogenetic Trees and Graphs |
|---|---|
| Description: | The {phyf} package implements a tibble and vctrs based object for storing phylogenetic trees along with data. It is fast and flexible and directly produces data structures useful for phylogenetic modelling in the {fibre} package. |
| Authors: | Russell Dinnage [aut, cre] (ORCID: <https://orcid.org/0000-0003-0846-2819>) |
| Maintainer: | Russell Dinnage <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.0.9000 |
| Built: | 2026-05-27 09:05:49 UTC |
| Source: | https://github.com/rdinnager/phyf |
ggplot2 plot for a pf objectMake an automatic ggplot2 plot for a pf object
## S3 method for class 'pf' autoplot( object, columns = NULL, layout = "circular", suppress_tiplabels = FALSE, suppress_tippoints = FALSE, edge_traits = FALSE, continuous = "colour", size = 1.4, outline_size = 1.4 * size, ... )## S3 method for class 'pf' autoplot( object, columns = NULL, layout = "circular", suppress_tiplabels = FALSE, suppress_tippoints = FALSE, edge_traits = FALSE, continuous = "colour", size = 1.4, outline_size = 1.4 * size, ... )
object |
A |
columns |
Columns to plot along with the phylogeny.
Can use bare column names or any other |
layout |
|
suppress_tiplabels |
If |
edge_traits |
A logical indicating whether the continuous avriable refers to edge traits, where the edge is determines by the terminal node. (default is FALSE, which means the variable refers to a node trait). |
continuous |
continuous transition for selected aesthethic ('size' or 'color'('colour')). It should be one of 'color' (or 'colour'), 'size', 'all' and 'none', default is 'colour'. |
... |
Other arguments passed to or from other methods. |
A ggplot object.
autoplot(pf(rpfc(100)) %>% dplyr::mutate(trait = rnorm(dplyr::n())), trait, layout = "rectangular")autoplot(pf(rpfc(100)) %>% dplyr::mutate(trait = rnorm(dplyr::n())), trait, layout = "rectangular")
The AVONET Bird Trait Database joined to a pf object (for {phyf}).
avonetavonet
avonetA 'pf' data frame (subclasses tibble) with 13,338 rows and 38 columns:
Node labels including species name for the tip labels
The phylogenetic flow column which stores the phylogenetic information
Taxonomic names – Names of the species, family and order, respectively
Number of individuals used to measure the data
Various traits of the bird species, see Source section to get more detailed information
The tree was from Jetz et al. (2012). I used the same tree as used in Maliet and Morlon (2021).
Tobias JA, Sheard C, Pigot AL, Devenish AJ, Yang J, Sayol F, Neate-Clegg MH, Alioravainen N, Weeks TL, Barber RA, Walkden PA. AVONET: morphological, ecological and geographical data for all birds. Ecology Letters. 2022 Mar 1;25(3):581-97.
Maliet, O., & Morlon, H. (2021). Fast and accurate estimation of species-specific diversification rates using data augmentation. Systematic biology.
Jetz, W., Thomas, G.H., Joy, J.B., Hartmann, K., & Mooers, A.O. (2012). The global diversity of birds in space and time. Nature, 491, 444-448.
A deep learning model was trained on the signed distance field of
3d bird beak scans. This dataset contain the learned latent codes that
produce the bird beak shapes when passed through the trained companion
neural network. The trained neural network is available from load_model()
#d scans used to train the model were retrieved from the MarkMyBird project
dataset (https://www.markmybird.org/).
bird_beak_codesbird_beak_codes
bird_beak_codesA 'pf' data frame (subclasses tibble) with 4,040 rows and 80 columns:
Node labels including species name for the tip labels
Logical specifying whether the row represents a tip on the phylogeny
The phylogenetic flow column which stores the phylogenetic information
The English common name for the bird species
The scientific name for the bird species
Various traits of the bird species, see Source section to get more detailed information
Taxonomic family latin name
Taxonomic family English common name
Taxonomic order
Oscine or Sub-Oscine
Two dimensional UMAP dimension reduction of the 64 latent variables
Three dimensional UMAP dimension reduction of the 64 latent variables
64 latent codes representing bird bealk shapes, estimated using a autodecoder neural network architecture
A data.frame with ecoregion ids and their name. This can be matched to the
ecoregions referred to in the dataset mammal_biogeo.
ecoregion_idsecoregion_ids
ecoregion_idsA 'pf' data frame (subclasses tibble) with 847 rows and 2 columns:
ID numbers for 847 ecoregions across the world
The name for the corresponding ecoregion ID
https://ecoregions.appspot.com
pfc
Make a phylogenetic interpolation pfc
make_interp(x, ...)make_interp(x, ...)
x |
A |
... |
Other arguments passed to or from other methods |
Data on terrestrial mammals biogeographic distributions across the world's ecoregions
joined to a pf object (for {phyf})
mammal_biogeomammal_biogeo
mammal_biogeoA 'pf' data frame (subclasses tibble) with 10,648 rows and 844 columns:
Node labels including species name for the tip labels
The phylogenetic flow column which stores the phylogenetic information
Species name used by the IUCN, matches with IUCN range polygons
Mammal species' body mass
Mammal species' average clutch size (# of offspring in a litter)
Mammal species' primary time of activity
...
...
...
Mammal species' range size in kilometers squared
Mammal species' IUCN threat category
Each of the 832 columns starting with "ecoregion:" represents the proportion of the mammal species' range that fall in the ecoregion with id equal to "eco_id".
https://ecoregions.appspot.com, https://www.iucnredlist.org/resources/spatial-data-download
None yet.
pf object constructorpf object constructor
pf(x = pfc(), pf_column = "phlo", ...)pf(x = pfc(), pf_column = "phlo", ...)
x |
a |
pf_column |
Name of the column to hold |
... |
Reserved for future extensions. Not used. |
a pf object
pf(rpfc(100))pf(rpfc(100))
pfc with ancestral featuresReturn a pfc with ancestral features
pf_anc(x, replace = 0)pf_anc(x, replace = 0)
x |
A |
replace |
Value to replace edge feature with no ancestral value (such as when the ancestor is the root) |
A new pfc with the same structure as x, but with
the features of each edge's ancestor instead
pf_anc(rpfc(100))pf_anc(rpfc(100))
pf objectConvert an object to a pf object
pf_as_pf(x, ...)pf_as_pf(x, ...)
x |
An object to convert |
... |
Other arguments pass to or from other methods. |
a pf object with branch lengths as features
pf_as_pf(ape::rtree(100))pf_as_pf(ape::rtree(100))
pfc object from a phylo objectMake a pfc object from a phylo object
pf_as_pfc(x, ...)pf_as_pfc(x, ...)
x |
A phylogenetic tree in |
... |
Arguments passed to or from other methods |
a pfc
pf_as_pfc(ape::rtree(100))pf_as_pfc(ape::rtree(100))
Convert pfc into a pftibble
pf_as_pftibble(x)pf_as_pftibble(x)
x |
a |
A tibble
pf_as_pftibble(rpfc(100))pf_as_pftibble(rpfc(100))
pf or pfc object to a ape::phylo objectThis function attempts to convert a pf or pfc object
to a phylogenyin phylo format (from package {ape}).
It will use the feature as branch lengths, and if edges
have multiple feature values, they will be aggregated
by averaging them. Note that this function can fail if the
pf or pfc does not have a tree-like structure. An example
of this would be an 'interaction' pfc (as generated by
pf_interaction)
pf_as_phylo(x, ...)pf_as_phylo(x, ...)
x |
a |
... |
Other arguments passed to or from other methods |
A phylo object
pf_as_phylo(rpfc(100))pf_as_phylo(rpfc(100))
pf or pfc object to a sparse matrix
representation.Convert a pf or pfc object to a sparse matrix
representation.
pf_as_sparse(x, ...)pf_as_sparse(x, ...)
x |
A |
... |
Arguments passed to or from other methods |
A dgCMatrix object (from the {Matrix} package). See
Matrix::sparseMatrix() for details.
pf_as_sparse(rpfc(100))pf_as_sparse(rpfc(100))
pfc with descendent's featuresNote that in the context of a phylogenetic flow, each element of the flow only has a single descendent, which is the next edge on the sequence between the root and the terminal node of the flow in question.
pf_desc(x, replace = 0)pf_desc(x, replace = 0)
x |
A |
replace |
Value to replace edge feature with no descendent values (such as when the edges are the tip edges). |
A new pfc with the same structure as x, but with
the features of each edge's descendant instead
pf_desc(rpfc(100))pf_desc(rpfc(100))
pfc objectFeatures of the returned pfc will be the output of the function applied
to the original features. Therefore the functionm provided must return a
vector the same length of the input.
pf_edge_apply(x, fun, ...)pf_edge_apply(x, fun, ...)
x |
A |
fun |
A function to apply to the edge vectors, which will be passed as the first argument. Must return a vector the same length and type as the input. |
... |
Any additional arguments to pass to |
A pfc object with the same structure as x but with features
replaced with the output of fun
## average features of descendents of each edge as a pfc: pf_edge_apply(pf_desc(pf_indexes(rpfc(100))), function(x) rep(mean(x), length(x)))## average features of descendents of each edge as a pfc: pf_edge_apply(pf_desc(pf_indexes(rpfc(100))), function(x) rep(mean(x), length(x)))
pfc objectExtract edge names from pfc object
pf_edge_names(x)pf_edge_names(x)
x |
|
A character vector of edge names
pf_edge_names(rpfc(100))pf_edge_names(rpfc(100))
Segments the edges of a phylogeny by splitting them at particular positions
pf_edge_segmentize(x, edges, positions)pf_edge_segmentize(x, edges, positions)
x |
A |
edges |
A vector of edge names |
positions |
A vector of position to cut the edges (must be same length as |
A pfc object with edges segmented
pf_edge_segmentize(rpfc(100), "t1", 0.01)pf_edge_segmentize(rpfc(100), "t1", 0.01)
Extract the features of the end edge of each phylogenetic flow
pf_end_features(x)pf_end_features(x)
x |
A |
A numeric vector of the features of the end edge of each phylogenetic flow
pf_end_features(rpfc(100))pf_end_features(rpfc(100))
Returns the end edge of each phylogenetic flow as a two-column tibble with start and end columns
pf_ends(x, return_names = TRUE)pf_ends(x, return_names = TRUE)
x |
A pfc object |
return_names |
If TRUE, return the start and end node names. If FALSE, return their indexes. |
A tibble with start and end nodes
pf_ends(rpfc(100))pf_ends(rpfc(100))
Get edges and positions along edges where a set of epoch times intersect
pf_epoch_info(x, times)pf_epoch_info(x, times)
x |
An object of class pfc |
times |
A vector of epoch times to slice the pfc along |
A tibble with edge labels in the first column and position in the second column
pf_epoch_info(rpfc(100), c(1, 2, 3))pf_epoch_info(rpfc(100), c(1, 2, 3))
Filter a pf or pfc object by taking all
descendents of the most recent common ancestor (mrca)
of descendents
pf_filter_with_mrca( x, descendents, drop_null_edges = TRUE, drop_root_edges = TRUE, ... )pf_filter_with_mrca( x, descendents, drop_null_edges = TRUE, drop_root_edges = TRUE, ... )
x |
A |
descendents |
An index into a |
drop_null_edges |
If |
drop_root_edges |
If |
... |
Other arguments for future extensions. |
A pf or pfc object
avonet %>% pf_filter_with_mrca(label %in% c("Platalea_minor", "Pelecanus_occidentalis"))avonet %>% pf_filter_with_mrca(label %in% c("Platalea_minor", "Pelecanus_occidentalis"))
Cumulative sum the phylogenetic flow features for each flow
in a pfc, returning a pfc.
pf_flow_cumsum(x, direction = c("from_root", "to_root"), ...)pf_flow_cumsum(x, direction = c("from_root", "to_root"), ...)
x |
A |
direction |
Which direction to take the cumulative sum along? "from_root", the default, goes from the root to the terminal nodes. "to_root" goes in the opposite direction, from the terminal nodes to the root. |
... |
Other arguments to pass to or from other methods |
A pfc object with cumulative sums of features in
place of the original features
pf_flow_cumsum(rpfc(100))pf_flow_cumsum(rpfc(100))
Sums the phylogenetic flow features for each flow
in a pfc, returning a vector of values.
pf_flow_sum(x, ...)pf_flow_sum(x, ...)
x |
A |
... |
Other arguments to pass to or from other methods |
A vector equal to the length of x with the
sum of each flow's features
pf_flow_sum(rpfc(100))pf_flow_sum(rpfc(100))
pfc
This is similar to base R's col() function, it returns a pfc with features
that are just the index of the edge. Useful for complex indexing procedures
pf_indexes(x)pf_indexes(x)
x |
A |
A new pfc with the same structure as x, but with
the features of each edge equal to the edge index (the column number in the
sparse matrix representation)
pf_indexes(rpfc(100))pf_indexes(rpfc(100))
pfc
pf_internal extracts or assigns a pfc or dgCMatrix into the internal
edges of a pfc.
pf_internal(x, ...) pf_internal(x) <- value pf_terminal(x, ...) pf_terminal(x) <- valuepf_internal(x, ...) pf_internal(x) <- value pf_terminal(x, ...) pf_terminal(x) <- value
x |
a |
... |
Arguments passed to or from other methods. |
value |
a |
pf_terminal extracts or assigns a pfc or dgCMatrix into the terminal
edges of a pfc.
a pfc object with flows truncated to internal nodes.
pfc1 <- rpfc(100) # Pagel's lambda transformation: lambda <- 0.5 lambda_pfc <- pfc1 root2node_lens <- pf_flow_sum(lambda_pfc) pf_internal(lambda_pfc) <- pf_internal(lambda_pfc) * lambda pf_terminal(lambda_pfc) <- pf_terminal(lambda_pfc) * (root2node_lens / pf_flow_sum(lambda_pfc)) plot(lambda_pfc)pfc1 <- rpfc(100) # Pagel's lambda transformation: lambda <- 0.5 lambda_pfc <- pfc1 root2node_lens <- pf_flow_sum(lambda_pfc) pf_internal(lambda_pfc) <- pf_internal(lambda_pfc) * lambda pf_terminal(lambda_pfc) <- pf_terminal(lambda_pfc) * (root2node_lens / pf_flow_sum(lambda_pfc)) plot(lambda_pfc)
Return a logical vector determining if a flow's terminal node is a descendant of an edge.
pf_is_desc(x, edge)pf_is_desc(x, edge)
x |
A |
edge |
An edge number or name |
A logical vector
pf_is_desc(rpfc(100), "Node12")pf_is_desc(rpfc(100), "Node12")
Test which elements of a pfc are empty
pf_is_empty(x, ...)pf_is_empty(x, ...)
x |
A |
... |
Further arguments for future extensions. Currently not used. |
A logical vector of the same length as x with TRUE where
there are empty flows in x, FALSE otherwise
pf_is_empty(rpfc(100))pf_is_empty(rpfc(100))
TRUE for the elements
of a pfc whci reprsent tips of a phylogenyReturn a logical vector which is TRUE for the elements
of a pfc whci reprsent tips of a phylogeny
pf_is_tips(x, ...)pf_is_tips(x, ...)
x |
A |
... |
Other arguments passed to or from other methods |
pf_is_tips(rpfc(100))pf_is_tips(rpfc(100))
pfc is the
multiplicand or the multiplier.Calculate a kronecker product when a pfc is the
multiplicand or the multiplier.
pf_kronecker(x, y, ...)pf_kronecker(x, y, ...)
x |
The kronecker multiplicand. |
y |
The kronecker multiplier. |
... |
Other arguments passed to or from other methods. |
A pfc object
pf_kronecker(rpfc(20), rpfc(20))pf_kronecker(rpfc(20), rpfc(20))
pfc objectReturn a vector of labels for a pfc object
pf_labels(x)pf_labels(x)
x |
A |
A character vector of labels
pf_labels(rpfc(100))pf_labels(rpfc(100))
pfc objectExtract mean edge features from pfc object
pf_mean_edge_features(x)pf_mean_edge_features(x)
x |
|
A numeric vector of mean edge features
pf_mean_edge_features(rpfc(100))pf_mean_edge_features(rpfc(100))
Return the edge leading up to the most recent common ancestor of a set of phylogenetic flows
pf_mrca(x, name = FALSE, ...)pf_mrca(x, name = FALSE, ...)
x |
A |
name |
Should the edge name be returned? If |
... |
Other arguments passed to or from other methods |
A string with the edge name is name = TRUE, or an integer
index otherwise
require(dplyr) avonet %>% filter(label %in% c("Platalea_minor", "Pelecanus_occidentalis")) %>% pull(phlo) %>% pf_mrca()require(dplyr) avonet %>% filter(label %in% c("Platalea_minor", "Pelecanus_occidentalis")) %>% pull(phlo) %>% pf_mrca()
pfc
Return the number of edges in a pfc
pf_nedges(x)pf_nedges(x)
x |
a |
The number of edges
pf_nedges(rpfc(100))pf_nedges(rpfc(100))
pfc
Get only the (internal) node elements of a pfc
pf_nodes(x)pf_nodes(x)
x |
A |
A pfc object with only internal node elements
pf_nodes(rpfc(100))pf_nodes(rpfc(100))
Replace features with ones
pf_ones(x)pf_ones(x)
x |
A |
A pfc object with all feature values replaced with ones
pf_ones(rpfc(100))pf_ones(rpfc(100))
pfp object from pfc, the paths of
each flow from root to terminal node.Extract pfp object from pfc, the paths of
each flow from root to terminal node.
pf_path(x)pf_path(x)
x |
A |
A pfp object
pf_path(rpfc(100))pf_path(rpfc(100))
pf objectExtracts the phylogenetic flow column of an pf object
pf_phyloflow(x)pf_phyloflow(x)
x |
A |
A pfc object (phylogenetic flow collection)
pf_phyloflow(avonet)pf_phyloflow(avonet)
pfc
Replace feature with edge position in flow in a pfc
pf_position(x)pf_position(x)
x |
A |
A new pfc with the same structure as x, but with
the features of each edge equal to the position along the flow as an integer
index
pf_position(rpfc(100))pf_position(rpfc(100))
pfc.Calculate a rowwise kronecker product when the multiplicand or multiplier
is a pfc.
pf_row_kron(x, y, ...)pf_row_kron(x, y, ...)
x |
The rowwise kronecker multiplicand |
y |
The rowwise kronecker multiplier |
... |
Other arguments passed to or from other methods. |
A pfc object.
pf_row_kron(rpfc(20), rpfc(20))pf_row_kron(rpfc(20), rpfc(20))
Can be used to standardise branch lengths to reasonable values
pf_scale_flow_sum(x, scale_to = 1)pf_scale_flow_sum(x, scale_to = 1)
x |
a |
scale_to |
The value to scale the sums to. Default is 1. |
a scaled pfc object
pf_scale_flow_sum(rpfc(100))pf_scale_flow_sum(rpfc(100))
pfc, which represents summed
branch length from each node to the terminal node along each flow.
When used in modelling traits, a second order pfc implies that
rates of evolution of the trait are themselves evolving according to
Brownian motion.Calculate a 'second order' pfc, which represents summed
branch length from each node to the terminal node along each flow.
When used in modelling traits, a second order pfc implies that
rates of evolution of the trait are themselves evolving according to
Brownian motion.
pf_second_order(x, ...)pf_second_order(x, ...)
x |
A |
... |
Additional arguments passed to or other methods. |
A pfc object
pf_second_order(rpfc(100))pf_second_order(rpfc(100))
Can be used to make random effects based on pfcs comparable.
pf_standardise(x)pf_standardise(x)
x |
a |
a scaled pfc object
pf_standardise(rpfc(100))pf_standardise(rpfc(100))
pfc
Get only the tip elements of a pfc
pf_tips(x)pf_tips(x)
x |
A |
A pfc object with only tip elements
pf_tips(rpfc(100))pf_tips(rpfc(100))
pfc
Calculate phylogenetic variance covariance matrix from pfc
pf_vcv(x, ...)pf_vcv(x, ...)
x |
A |
... |
Other arguments for future extensions. |
A sparseMatrix
pf_vcv(rpfc(10))pf_vcv(rpfc(10))
Replace features with zeros
pf_zeros(x)pf_zeros(x)
x |
A |
A pfc object with all feature values replaced with zeros
pf_zeros(rpfc(100))pf_zeros(rpfc(100))
pfc)Create a new phylogenetic flow collection object (pfc)
pfc( pfn = character(), pfpp = pfp(), pfl = list(), is_tip = logical(), edge_names = character(), internal = logical(), node_ord = NULL, edge_ord = NULL, sparse_mat = NULL ) pf_is_pfc(x)pfc( pfn = character(), pfpp = pfp(), pfl = list(), is_tip = logical(), edge_names = character(), internal = logical(), node_ord = NULL, edge_ord = NULL, sparse_mat = NULL ) pf_is_pfc(x)
pfn |
A character vector of names for each phylogenetic flow |
pfpp |
A vector of phylogenetic flow paths of class |
pfl |
A list of phylogenetic flow feature. Should be numeric. |
is_tip |
A logical vector specifying whether the phylogenetic flow reaches the phylogeny's tips |
edge_names |
A character vector of names for the phylogeny's edges |
internal |
A logical vector specifying whether each edge is internal (not leading to a tip) |
node_ord |
An optional integer vector specifying an order for the
nodes. Usually used to store ordering information from another tree
format such as |
edge_ord |
An optional integer vector specifying an order for the
edges. Usually used to store ordering information from another tree
format such as |
sparse_mat |
A sparse matrix representation of the phylogenetic
flow collection. Can be left |
x |
An object to be tested |
A pfc object
Convert pftibble into a pfc
pfc_from_pftibble(pft)pfc_from_pftibble(pft)
x |
a pftibble |
A pfc
pfc_from_pftibble(pf_as_pftibble(rpfc(100)))pfc_from_pftibble(pf_as_pftibble(rpfc(100)))
pfp)Create a new phylogenetic flow path object (pfp)
pfp(x = list()) pf_is_pfp(x)pfp(x = list()) pf_is_pfp(x)
x |
|
A pfp object
pfp(ape::nodepath(ape::rtree(100)))pfp(ape::nodepath(ape::rtree(100)))
A deep learning model was trained on the signed distance field of
3d bird beak scans. This dataset contain the learned latent codes that
produce the bird beak shapes when passed through the trained companion
neural network. The trained neural network is available from load_model()
#d scans used to train the model were retrieved from the MarkMyBird project
dataset (https://www.markmybird.org/).
plant_fungusplant_fungus
plant_fungusA 'pf' data frame (subclasses tibble) with 4,040 rows and 80 columns:
Node labels including species name for the tip labels
Logical specifying whether the row represents a tip on the phylogeny
The phylogenetic flow column which stores the phylogenetic information
The English common name for the bird species
The scientific name for the bird species
Various traits of the bird species, see Source section to get more detailed information
Taxonomic family latin name
Taxonomic family English common name
Taxonomic order
Oscine or Sub-Oscine
Two dimensional UMAP dimension reduction of the 64 latent variables
Three dimensional UMAP dimension reduction of the 64 latent variables
64 latent codes representing bird bealk shapes, estimated using a autodecoder neural network architecture
https://datadryad.org/stash/dataset/doi:10.5061/dryad.723m1
pf objectMake a plot for a pf object
## S3 method for class 'pf' plot(x, columns = NULL, layout = "fan", suppress_tiplabels = FALSE, ...)## S3 method for class 'pf' plot(x, columns = NULL, layout = "fan", suppress_tiplabels = FALSE, ...)
x |
A |
columns |
Bare column names of variables to plot with tree. |
layout |
Either 'phylogram' or 'fan' |
... |
Other arguments passed to |
A phytools::contMap() object.
Data on primates diets and their threat status joined to a pf object (for {phyf})
primate_dietprimate_diet
primate_dietA 'pf' data frame (subclasses tibble) with 504 rows and 55 columns:
Node labels including species name for the tip labels
The phylogenetic flow column which stores the phylogenetic information
IUCN threat category
Threat status data source – see primate_refs dataset
Primate species' mean body mass in grams
Body mass data source – see primate_refs dataset
Primate species' range size in kilometers
Range size data source – see primate_refs dataset
Primate species' disparity of diet items as measured by Phylogenetic Species Variability (PSV) metric.
Primate species' breadth of diet items as measured by the number of different diet items (richness).
Primate species' diversity of diet items as measured by the DDI metric.
Primate species' trophic guild. Possible values: "Omnivore", "Frugivore", "Gummivore", "Insectivore", or "Folivore-frugivore"
Each of the 40 columns starting with "diet_item:" represents a different type of item in primates' diets. These are binary integer columns with a 1 if the species feeds on that diet item or 0 if it does not.
https://zslpublications.onlinelibrary.wiley.com/doi/full/10.1111/acv.12823
Machado, F. F., Jardim, L., Dinnage, R., Brito, D., & Cardillo, M. (2022). Diet disparity and diversity predict extinction risk in primates. Animal Conservation.
A data.frame representing an hierarchical categorization of primate diet items
primate_diet_hierarchyprimate_diet_hierarchy
primate_hierarchyA data frame with 40 rows and 6 columns:
Food item name. This matches the 'item' 'diet_item:item'
columns in the primate_diet data set
A category categorizing the food items immediately above the items themselves
Additional categories arranged in an heirarchy
https://zslpublications.onlinelibrary.wiley.com/doi/full/10.1111/acv.12823
Machado, F. F., Jardim, L., Dinnage, R., Brito, D., & Cardillo, M. (2022). Diet disparity and diversity predict extinction risk in primates. Animal Conservation.
A data.frame with references for the Primate Diet Data. See the primate_diet
data set.
primate_diet_refsprimate_diet_refs
primate_diet_refsA 'pf' data frame (subclasses tibble) with 4 rows and 3 columns:
Food item name. This matches the 'item' 'diet_item:item'
columns in the primate_diet data set
A category categorizing the food items immediately above the items themselves
Additional categories arranged in an heirarchy
https://zslpublications.onlinelibrary.wiley.com/doi/full/10.1111/acv.12823
Machado, F. F., Jardim, L., Dinnage, R., Brito, D., & Cardillo, M. (2022). Diet disparity and diversity predict extinction risk in primates. Animal Conservation.
pfc objectGenerate a random tree and return it as a
pfc object
rpfc(n, method = ape::rcoal, ...)rpfc(n, method = ape::rcoal, ...)
n |
Number of tips in the generated tree. |
method |
A function to generate a tree. Default
is |
... |
Additional arguments to pass to |
a pfc object
plot(rpfc(100))plot(rpfc(100))
Data on vertebrate base Metabolic rates joined to a pf object (for {phyf})
vert_bmrvert_bmr
vert_bmrA 'pf' data frame (subclasses tibble) with 1,712 rows and 8 columns:
Node labels including species name for the tip labels
The phylogenetic flow column which stores the phylogenetic information
Natural log of the base metabolic rate
Natural log of body mass
Squared natural log of body mass
Natural log of genome size
Is the species endothermic? 1 for yes, 0 for no
https://datadryad.org/stash/dataset/doi:10.5061/dryad.3c6d2
Uyeda JC, Pennell MW, Miller ET, Maia R, McClain CR. The evolution of energetic scaling across the vertebrate tree of life. The American Naturalist. 2017 Aug 1;190(2):185-99.