write.custom.dataset: Write HDF5 Groups and Datasets

View source: R/write.dataset.R

write.custom.datasetR Documentation

Write HDF5 Groups and Datasets

Description

Writes hierarchical groups and datasets safely into an HDF5 file.

Usage

write.custom.dataset(filename = "temp.hdf5", group = "group", object, mode = "a",
dataset.name = "matrix", dataset.type = h5types$H5T_IEEE_F32LE, compression.level = 0,
overwrite = FALSE)
write.group.safe(filename = "temp.hdf5", group = "group")

Arguments

filename

Character scalar; the path name of the HDF5 file requested. The package will check that the files and path exists and we have write access.

group

Character scalar; the full path of the group. This will be created if not present.

object

Numeric matrix; the object to be written out to HDF5.

mode

Character scalar; mode to use when writing the HDF5 (seeH5File).

dataset.name

Character scalar; the name of dataset within the HDF5 group.

dataset.type

HDF5 data type as per h5types.

compression.level

Integer scalar; 0-9 gzip compression level, where 0 is not compressed and 9 is highly compressed.

overwrite

Logical; should dataset be overwritten if already present?

Details

write.group.safe will safely write a hierarchical group to a HDF5 file.

write.custom.dataset is mostly used to save compact 32 bit single numeric matrices to HDF5 datasets, rather than the native R doubles. Can save other types too by changing dataset.

Value

Run for the side effect of making the desired HDF5 file.

Author(s)

Danail Obreschkow & Aaron Robotham

See Also

write.SED

Examples

# Nothing yet!

asgr/Viperfish documentation built on July 8, 2023, 12:30 a.m.