getTSSdata {poweRbal} | R Documentation |
Functions for generating the TSS data under a tree model
Description
getTSSdata
- Compute the tree shape statistics of trees generated
under a tree model for each given TSS.
getTSSdata_trees
- Compute the tree shape statistics for each given
TSS and all given trees.
Usage
getTSSdata(tss, n, Ntrees = 1L, tm)
getTSSdata_trees(tss, treeList)
Arguments
tss |
Vector containing the names (as character) of the tree shape
statistics that should be compared. You may either use the short names
provided in |
n |
Integer value that specifies the desired number of leaves, i.e., vertices with in-degree 1 and out-degree 0. |
Ntrees |
Integer value (default = 1) that specifies the desired number of generated trees. |
tm |
If the respective model is included in this package, then specify
the model and its parameters by using a character or list. Available are all
options listed under parameter |
treeList |
List of trees of class |
Value
getTSSdata
Numeric matrix of TSS values (one row per TSS).
getTSSdata_trees
Numeric matrix of TSS values
(one row per TSS).
Author(s)
Sophie Kersting
Examples
# Example using tree models included in this package.
getTSSdata(tss = c("Colless", "Sackin"), n = 5L, Ntrees = 3L,
tm = "yule")
# Example using a "new" TM provided by the user.
my_aldous <- list(func = function(n, Ntrees){
trees <- lapply(1:Ntrees,
function(x){genAldousBetaTree(n = n, BETA =5L)})
attr(trees, "class") <- "multiPhylo"
return(trees)})
getTSSdata(tss = c("Colless", "Sackin"), n = 5L, Ntrees = 3L,
tm = "my_aldous")
# Example using TSS provided in tssInfo.
getTSSdata_trees(tss = c("Colless", "Sackin"),
treeList = lapply(1:6L, function(x) genYuleTree(5)))
# Example using a "new" TSS provided by the user.
my_avd <- list(func = treebalance::avgVertDep, short = "My AVD")
getTSSdata_trees(tss = c("Colless", "my_avd"),
treeList = lapply(1:6L, function(x) genYuleTree(5)))