mem_igraph.Rd
mem_igraph()
retrieves the igraph structure of snapshot
. The
igraph structure is cached inside snapshot
by side effect to
avoid recomputing it multiple times.
mem_igraph(snapshot)
A memtools snapshot.
The igraph is ordered according to the original data frame
ordering. Rearranging the rows of snapshot
does not rearrange the
igraph.
s <- mem_snapshot(list(1, list(2)))
#> Creating snapshot...
#> Computing dominance and retainment...
#> Creating data frame...
# Retrieve the igraph. It is first computed and then cached inside
# the snapshot so it does not need to be recreated again.
g <- mem_igraph(s)
#> Adding igraph structure to snapshot as `mem_igraph` attribute...
# Work with igraph
igraph::gsize(g)
#> [1] 3