hdf5                  package:hdf5                  R Documentation

_I_n_t_e_r_f_a_c_e _t_o _t_h_e _H_D_F_5 _L_i_b_r_a_r_y

_D_e_s_c_r_i_p_t_i_o_n:

     'hdf5save' and 'hdf5load' provide an experimental interface to the
     NCSA HDF5 library.

_U_s_a_g_e:

     hdf5save(fileout, ...)
     hdf5load(file, load = TRUE, verbosity = 0, tidy = FALSE)

_A_r_g_u_m_e_n_t_s:

 fileout: the name of the file in which the objects will be stored.

     ...: the names of the objects to be saved.

    file: The name of an HDF5 file to be read in.

    load: A logical value. If 'FALSE', the objects are returned as the
          components of a named list. If 'TRUE' (the default), the
          objects are loaded as individual variables with their own
          names - the function returns nothing in this case.

verbosity: An integer controlling the verbosity. With 'verbosity = 0'
          (the default) the hdf5 file is loaded quietly.  With
          'verbosity = 1' names of groups and datasets are printed as
          they are encountered - this can be reassuring if you have a
          large file which is taking a while to load. Greater  values
          of verbosity produce more messages which are probably only
          useful for debugging.

    tidy: A logical value. If 'FALSE' (the default), the names of the R
          objects will be the same as the HDF5 groups and datasets.
          HDF5 names can contain various characters which are not
          permissible in R variable names (e.g. +, -, _, space etc.).
          If 'tidy = TRUE', then all these characters are converted to
          ".". The first character will also be converted to "." if it
          is a digit. This is clearly not foolproof as "foo+" and
          "foo-" will both be tidied to "foo.".

_D_e_t_a_i_l_s:

     'hdf5save' writes a representation of R objects to the specified
     file in a form which can be read by software which understands the
     HDF5 format. The objects can be read back from the file at a later
     date by using the function 'hdf5load'.

     Not all R types are supported and it probably doesn't make sense
     to put some of them into an HDF file (e.g. closures).  However,
     lists, strings, vectors, matrices, and higher-dimensional arrays
     work. Lists map to HDF groups. Vectors and matrices map to
     datasets.

     This capability is only available on machines which have the HDF5
     library, version 1.2 or higher (freely available from the
     reference below).

_A_u_t_h_o_r(_s):

     Marcus G. Daniels mgd@swarm.org, Hugh C. Pumphrey
     H.C.Pumphrey@ed.ac.uk, Philippe Grosjean phgrosjean@sciviews.org

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://hdf.ncsa.uiuc.edu>

_S_e_e _A_l_s_o:

     'save', 'load'

_E_x_a_m_p_l_e_s:

     (m <- cbind(A = 1, diag(4)))
     ll <- list(a=1:10, b=letters[1:8]);
     l2 <- list(C="c", l=ll); PP <- pi
     hdf5save("ex1.hdf", "m","PP","ll","l2")
     rm(m,PP,ll,l2)  # and reload them:
     hdf5load("ex1.hdf",verbosity=3)
     m        # read from "ex1.hdf"; buglet: dimnames dropped
     str(ll)
     str(l2)

