Learn R Programming

h5 (version 0.9.1)

DataSet: The DataSet Class

Description

DataSets are used to store data objects in the HDF5 tree. Data objects contain homogeneous data of one type like numeric, integer or character and can be subsetted, extended and enriched with Attributes (see DataSet-Subset, DataSet-Extend and H5Location-Attribute). Although subsetting operators provide a convenient way to handle DataSet objects the S4 methods described in this section are used under the hood and give more control. Especially for big DataSets it can be advantageous to use these methods with DataSpace objects including hyperslab selections.

Usage

writeDataSet(.Object, data, dspace = selectDataSpace(.Object, rep(NA_integer_,
  length(.Object@dim)), GetDimensions(data)), transpose = TRUE)

## S3 method for class 'DataSet': writeDataSet(.Object, data, dspace = selectDataSpace(.Object, rep(NA_integer_, length(.Object@dim)), GetDimensions(data)), transpose = TRUE)

readDataSet(.Object, dspace = selectDataSpace(.Object, offset = rep(NA_integer_, length(.Object@dim)), count = rep(NA_integer_, length(.Object@dim))))

## S3 method for class 'DataSet': readDataSet(.Object, dspace = selectDataSpace(.Object, offset = rep(NA_integer_, length(.Object@dim)), count = rep(NA_integer_, length(.Object@dim))))

## S3 method for class 'DataSet': h5close(.Object)

Arguments

.Object
DataSet; S4 object of class DataSet;
data
object; Object to be stored in HDF5 file, can be either of type vector, matrix or array.
dspace
DataSpace; Data space object used for data selection.
transpose
logical; Determine if data object (if is array) should be transposed.
offset
numeric; Offset to be selected from Hyperslab.
count
numeric; Count to be selected from Hyperslab.
...
additional arguments passed to c.

References

http://www.hdfgroup.org/HDF5/doc/UG/UG_frame10Datasets.html