phylotree_to_B {GeRnika} | R Documentation |
Phylotree
object.This function retrieves the B matrix of a Phylotree
object.
phylotree_to_B(phylotree)
phylotree |
A |
A data.frame
representing the B matrix of the phylogenetic tree.
# 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)