powered by
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.
HDF5Matrix
prod(dim(x))
base::length()
# S3 method for HDF5Matrix length(x)
A single integer: nrow(x) * ncol(x).
nrow(x) * ncol(x)
An HDF5Matrix object.
# \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) # }
Run the code above in your browser using DataLab