Description Usage Arguments Value Examples
View source: R/Function_ComputePairWiseModelDistances_BM.R
This function returns a list of pairwise model distances
1 2 3 4 | Function_ComputePairWiseModelDistances_BM(
phylogeny.TreeSet,
matrix.ModelParams
)
|
phylogeny.TreeSet |
Set of phylogenetic trees |
matrix.ModelParams |
Matrix of model parameters (BM) for each tree in the given set |
List List of pairwise model distances
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ################
# Load depends #
################
library(ape)
library(geiger)
library(gaussDiff)
#########################
# Simulate random trees #
#########################
handle.SimulatedRandomTrees <- rmtree(N = 10, n = 10)
vector.SimulatedDataset <- fastBM(tree = handle.SimulatedRandomTrees[[1]], a = 0, mu = 1)
#######################
# Fit models to trees #
#######################
handle.FittedPhylogeneticModels <- Function_FitCont_TreeSet_BM(phylogeny.TreeSet = handle.SimulatedRandomTrees, vector.InputData = vector.SimulatedDataset)
##############################
# Compute pairwise distances #
##############################
handle.Results <- Function_ComputePairWiseModelDistances_BM(phylogeny.TreeSet = handle.SimulatedRandomTrees, matrix.ModelParams = handle.FittedPhylogeneticModels)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.