Description Usage Arguments Value Examples
View source: R/Function_ComputeDistances_2Networks.R
This function returns a vector containing the Hellinger and KL distances between two tree models
1 2 3 4 | Function_ComputeDistances_2Networks(
list.Model_01_Network,
list.Model_02_Network
)
|
list.Model_01_Network |
List containing network model with (1) phylogenetic tree (2) table of migratio flow (3) vector.Z and (4) Sig2 parameter |
list.Model_02_Network |
List containing network model with (1) phylogenetic tree (2) table of migratio flow (3) vector.Z and (4) Sig2 parameter |
vector.Distances Vector containing the distances computed between the two focal tree models
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 26 | ################
# Load depends #
################
library(ape)
library(geiger)
library(gaussDiff)
library(BMhyd)
######################################
# Specific list for network model 01 #
######################################
list.Model_01_Network <- list(handle.Phylogeny = handle.SimulatedNetwork$phy,
handle.Flow = handle.SimulatedNetwork$phy,
vector.Z = rep(0, length(network$phy$tip.label)),
numeric.Sig2 = 1)
list.Model_02_Network <- list(handle.Phylogeny = handle.SimulatedNetwork$phy,
handle.Flow = handle.SimulatedNetwork$phy,
vector.Z = rep(0, length(network$phy$tip.label)),
numeric.Sig2 = 2)
#####################
# Compute distances #
#####################
Function_ComputeDistances_2Networks(list.Model_01_Network = list.Model_01_Network,
list.Model_02_Network = list.Model_02_Network)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.