create_standard_mutation_rate: Create the parameters for the mutation rate

View source: R/create_standard_mutation_rate.R

create_standard_mutation_rateR Documentation

Create the parameters for the mutation rate

Description

Create the parameters for the mutation rate

Usage

create_standard_mutation_rate(phylogeny)

Arguments

phylogeny

a phylogeny of class phylo

Value

the mutation rate

Author(s)

Giovanni Laudanno, Richèl J.C. Bilderbeek

Examples


# Phylogeny with a crown age of 3.0
phylogeny <- ape::read.tree(text = "((A:2, B:2):1, C:3);")
# Expected mutation rate is one divided by the crown age
create_standard_mutation_rate(phylogeny) # 0.333

# Phylogeny with a crown age of 4.0
phylogeny <- ape::read.tree(text = "((A:2, B:2):2, C:4);")
# Expected mutation rate is one divided by the crown age
create_standard_mutation_rate(phylogeny) # 0.25


richelbilderbeek/pirouette documentation built on Oct. 18, 2023, 3:09 p.m.