swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] Basic Swarm to HDF5 question


From: Marcus G. Daniels
Subject: Re: [Swarm-Support] Basic Swarm to HDF5 question
Date: Sun, 02 Sep 2007 10:17:43 -0600
User-agent: Thunderbird 1.5.0.12 (X11/20070719)

Hi Kerimcan,

Another place to look is in the Swarm testsuite (in the Swarm source code).
For example tests/collections contrasts shallow (table-like) vs depth-first (tree-like) saving.

The HDF5 files created by those tests, e.g. shallowList.hdf and shallowMap.hdf can be loaded as data frames in R. Maps will have row names attached and lists will not. The deepMap.hdf and deepList.hdf will be lists of lists when loaded into R. To load, use:

 library(hdf5)
 hdf5load("shallowMap.hdf")
 collections

Marcus

P.S. while the Swarm side of this is really random access, the R side is not. It's necessary to load the whole file into memory. That's not such a big deal these days with cheap RAM and 64 bit architectures, but it might be nice to rework the R module to do what the PgSQL module used to do, whereby one `attaches' to the database and then proxies to the objects are available as ordinary variables, but lazily evaluated for the sake of random access.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]