Skip to content

R and HDF5 Question

4 messages · Scott MacDonald, Berwin A Turlach, Paul Hiemstra

#
G'day Scott,

On Fri, 13 Nov 2009 09:52:43 -0700
Scott MacDonald <scott.p.macdonald at gmail.com> wrote:

            
It's a while that I used hdf5 files and that package in R, but:
Is NULL the return of the hdf5load command or are you typing it on the
command line?

Anyway, .hdf5 files can contain several objects, just as R's .rda
file.  load() will load an .rda file and put all objects in that file
into the workspace.  Likewise, hdf5load() loads an hdf5 file and puts
all objects in that file into the workspace.
Did you try an ls() after the hdf5load() command?  If the hdf5load()
command was successfull, an ls() should show you that an object with
name "dset" is now in your workspace; if I read the output above
correctly.

HTH.

Cheers,
	
	Berwin
#
Hi,

You can also read the hdf5 files with the rgdal package. This loads them 
into sp-objects, see the sp-package for more info. In the archives of 
the r-sig-geo mailing list there have been some other people (including 
myself :)) that have asked this question:

https://stat.ethz.ch/pipermail/r-sig-geo/2009-January/004828.html
http://markmail.org/message/ypsr77vl3qscq72f#query:r-sig-geo%20read%20hdf5+page:1+mid:ivkt5qxroeh3z646+state:results
http://www.mail-archive.com/r-sig-geo at stat.math.ethz.ch/msg01871.html

cheers,
Paul
Scott MacDonald wrote: