H5R-class: Class for HDF5 Reference datatypes.

Description Value Methods Author(s) Examples

Description

H5R is only the common base class and is never used. User should not create objects of this class by themselves and instead use the create_reference methods of H5D, H5Group or H5File classes. Sub-classes are H5R_OBJECT and H5R_DATASET_REGION

Value

Object of class H5R.

Methods

subset_read(dim_index, drop = TRUE)

Method that returns a subset of the data in the H5R-object

Parameters

dim_index

A list of dimension indices as usually pasted into [

drop

Logical. Should dimensions of size 1 be dropped.

subset2_read(i, exact = TRUE)

Method to read a single item

Parameters

i

The single item to read

exact

Is the item name exact or should partial matching be allowed?

subset_assign(dim_index, value)

Assign values into a subset of the H5R-vector

Parameters

dim_index

A list of dimension indices as usually passed into [

value

The value to assign

subset2_assign(i, exact = TRUE, value)

Assign a value to a single value in the array

Parameters

i

the index where to assign the value

value

The value to assign

t()

Transpose the object if it is a matrix (i.e. has rank 2

length()

Get the length of the object

ref(ref)

Get or assign the internal raw-vector representation of the data. Usually, user's shouldn't have to use this.

dim(x)

Get or assign the dimensionality of the object

dimnames(x)

Get or assign the dimnames of the object

names(x)

Get or assign the names of the object

rank()

Get the rank of the object

Author(s)

Holger Hoefling

Examples

1
2
3
4
5
6
fname <- tempfile(fileext = ".h5")
file <- H5File$new(fname, mode = "a")
file[["testset"]] <- matrix(rnorm(9), nrow = 3)
dset <- file[["testset"]]
r <- file$create_reference("testset")
file$close_all()

hdf5r documentation built on Nov. 16, 2021, 1:06 a.m.