Description Usage Arguments Value Examples
View source: R/Function_ComputePairWiseModelDistances_OU.R
This function returns a list of pairwise distances under the OU models
1 2 3 4 | Function_ComputePairWiseModelDistances_OU(
phylogeny.TreeSet,
matrix.ModelParams
)
|
phylogeny.TreeSet |
Set of phylogenetic trees |
matrix.ModelParams |
Matrix of model parameters (OU) 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 23 24 25 | ################
# Load depends #
################
library(ape)
library(geiger)
library(gaussDiff)
#########################
# Simulate random trees #
#########################
handle.SimulatedRandomTree <- rmtree(N = 1, n = 10)
handle.SimulatedRandomTrees <- list()
class(handle.SimulatedRandomTrees) <- "multiPhylo"
handle.SimulatedRandomTrees[[1]] <- handle.SimulatedRandomTrees[[2]] <- handle.SimulatedRandomTrees[[3]] <- handle.SimulatedRandomTrees[[4]] <- handle.SimulatedRandomTrees[[5]] <- handle.SimulatedRandomTree[[1]]
vector.SimulatedDataset <- fastBM(tree = handle.SimulatedRandomTrees[[1]], a = 0, sig2 = 1, alpha = 2)
#######################
# Fit models to trees #
#######################
handle.FittedPhylogeneticModels <- Function_FitCont_TreeSet_0U(phylogeny.TreeSet = handle.SimulatedRandomTrees, vector.InputData = vector.SimulatedDataset)
##############################
# Compute pairwise distances #
##############################
handle.Results <- Function_ComputePairWiseModelDistances_OU(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.