length.HDF5Matrix

length.HDF5Matrix

OTHER

1 Description

Returns the total number of elements in an HDF5Matrix object, defined as prod(dim(x)) — consistent with the behaviour of base::length() for ordinary R matrices.

2 Usage

length.HDF5Matrix(x)

3 Arguments

Parameter Description
x An object.

4 Value

A single integer: .

5 Examples

\donttest{
tmp <- tempfile(fileext = ".h5")
X <- hdf5_create_matrix(tmp, "data/m", data = matrix(1:100, 10, 10))
length(X)   # 100
close(X); unlink(tmp)
}