loadTreeMan: Load a TreeMan object in serialization format

Description Usage Arguments Details See Also Examples

View source: R/read-write-methods.R

Description

TreeMan equivalent to load() but able to handle node matrices.

Usage

1

Arguments

file

file path

Details

It is not possible to use save() on TreeMan objects with node matrices. Node matrices are bigmemory matrices and are therefore outside the R environment, see bigmemory documentation for more information. Saving and loading a bigmemory matrix may cause memory issues in R and cause R to crash.

This function can safely read a TreeMan object with and without a node matrix. saveTreeMan() function stores the tree using the serialization format and the node matrix as a hidden .csv. Both parts of the tree can be reloaded to an R environment with loadTreeMan(). The hidden node matrix filename is based on the file argument: file + _ndmtrx

Reading and writing trees with saveTreeMan() and loadTreeMan is faster than any of the other read and write functions.

See Also

saveTreeMan, readTree,writeTree, readTrmn, writeTrmn

Examples

1
2
3
4
5
6
library(treeman)
tree <- randTree(100, wndmtrx=TRUE)
saveTreeMan(tree, file='test.RData')
rm(tree)
tree <- loadTreeMan(file='test.RData')
file.remove('test.RData', 'testRData_ndmtrx')

treeman documentation built on July 8, 2020, 7:28 p.m.