h5arrayCreate: Function to create a new h5array object in an HDF5 file.

Description Usage Arguments Value Author(s) See Also Examples

Description

This function will create a HDF5 file (if it doesn't exist yet) and add a new dataset with the specified properties to it.

Usage

1
h5arrayCreate(fn, location, dim, storage.mode, ...)

Arguments

fn

Filename pecifying the location of the HDF5 file

location

Location within the HDF5 file (see HDF5 secifications at HDFgroup.org). Note that the combination of fn and location uniquely identify a h5array object. If you create two h5array objects that have the same filename and location they will point to the same data on disk and can modify it both, this can lead to unexpected behaviour if not used cautiously.

With great power comes great responsibility.

dim

the dimensions of the array

storage.mode

the storage mode, can be e.g. "double" or "character", see the rhdf5 documentation for more information

...

any additional arguments will be passed on to the h5createDataset function

Value

An h5array object pointing to the newly created dataset.

Author(s)

Paul Theodor Pyl

See Also

h5matrixCreate

Examples

1
2
3
4
5
x <- h5arrayCreate(tempfile(), "Data", c(4,10), "double")
colnames(x) <- letters[1:10]
x
y <- h5arrayCreate(tempfile(), "CharData", c(2,4,3), "character", size = 10)
y

PaulPyl/h5array documentation built on May 8, 2019, 12:57 a.m.