Skip to content
Prev 324075 / 398503 Next

Could graph objects be stored in a "two-dimensional list"?

You could use lists of lists, and index them with vectors.

a <- list()
a[[1]] <- list()
a[[2]] <- list()
a[[c(1,1)]] <- g11
a[[c(1,2)]] <- g12
a[[c(2,1)]] <- g21
a[[c(2,2)]] <- g22
print(a[[c(2,1)]])

but this seems like an inefficient use of memory because your indexed data is stored more compactly than the graph object is. I would index the data and generate the graph object on the fly when I wanted to see it.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
jpm miao <miaojpm at gmail.com> wrote: