phylotree_to_B {GeRnika} | R Documentation |
Get B matrix from Phylotree
object.
Description
This function retrieves the B matrix of a Phylotree
object.
Usage
phylotree_to_B(phylotree)
Arguments
phylotree |
A |
Value
A data.frame
representing the B matrix of the phylogenetic tree.
Examples
# Get the B matrix of a tumor instance
# composed by 10 subpopulations of
# clones
B <- create_instance(
n = 10,
m = 4,
k = 1,
selection = "neutral")$B
# Create a new 'Phylotree' object
# on the basis of the B matrix
phylotree <- B_to_phylotree(B)
# Get the B matrix of the phyotree
b1 <- phylotree_to_B(phylotree)
[Package GeRnika version 1.0.0 Index]