Learn R Programming

pirouette (version 1.6.9)

create_standard_mutation_rate: Create the parameters for the mutation rate

Description

Create the parameters for the mutation rate

Usage

create_standard_mutation_rate(phylogeny)

Value

the mutation rate

Arguments

phylogeny

a phylogeny of class phylo

Author

Giovanni Laudanno, Richèl J.C. Bilderbeek

Examples

Run this code

# 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

Run the code above in your browser using DataLab