treeman (version 1.1.4)

addNdmtrx: Add node matrix to a tree

Description

Return tree with node matrix added.

Usage

addNdmtrx(tree, shared = FALSE, ...)

Arguments

tree

TreeMan object

shared

T/F, should the bigmatrix be shared? See bigmemory documentation.

...

as.big.matrix() additional arguments

Details

The node matrix makes 'enquiry'-type computations faster: determining node ages, number of descendants etc. But it takes up large amounts of memory and has no impact on adding or removing tips. Note, trees with the node matrix can not be written to disk using the 'serialization format' i.e. with save or saveRDS. The matrix is generated with bigmemory's `as.big.matrix()`.

See Also

updateSlts, rmNdmtrx, https://cran.r-project.org/package=bigmemory

Examples

Run this code
# NOT RUN {
# library(treeman)
tree <- randTree(10, wndmtrx=FALSE)
summary(tree)
tree <- addNdmtrx(tree)
summary(tree)
# }

Run the code above in your browser using DataCamp Workspace