Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

h5save

Saves a series of objects to an HDF5 file.


Description

Saves a number of R objects to an HDF5 file.

Usage

h5save(..., file, name = NULL, createnewfile = TRUE, native = FALSE)

Arguments

...

The objects to be saved.

file

The filename (character) of the file in which the dataset will be located. For advanced programmers it is possible to provide an object of class H5IdComponent representing a H5 location identifier (file or group). See H5Fcreate, H5Fopen, H5Gcreate, H5Gopen to create an object of this kind.

name

A character vector of names for the datasets. The length of the name vector should match the number of objects.

createnewfile

If TRUE, a new file will be created if necessary.

native

An object of class logical. If TRUE, array-like objects are treated as stored in HDF5 row-major rather than R column-major orientation. Using native = TRUE increases HDF5 file portability between programming languages. A file written with native = TRUE should also be read with native = TRUE

.

Details

The objects will be saved to the HDF5 file. If the file does not exists it will be created. The data can be read again by either h5dump or individually for each dataset by h5read.

Value

Nothing returned.

Author(s)

Bernd Fischer

References

See Also

Examples

A = 1:7;  B = 1:18; D = seq(0,1,by=0.1)
h5save(A, B, D, file="ex_save.h5")
h5dump("ex_save.h5")

rhdf5

R Interface to HDF5

v2.34.0
Artistic-2.0
Authors
Bernd Fischer [aut], Mike Smith [aut, cre] (<https://orcid.org/0000-0002-7800-3848>), Gregoire Pau [aut], Martin Morgan [ctb], Daniel van Twisk [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.