dim.HDF5Matrix: Dimensions of an HDF5Matrix

View source: R/S3_core.R

dim.HDF5MatrixR Documentation

Dimensions of an HDF5Matrix

Description

Dimensions of an HDF5Matrix

Usage

## S3 method for class 'HDF5Matrix'
dim(x)

Arguments

x

An HDF5Matrix object

Value

Integer vector c(nrows, ncols)

Examples


tmp <- tempfile(fileext = ".h5")

X  <- hdf5_create_matrix(tmp, "data/matrix", data = matrix(rnorm(100), 10, 10))
X <- hdf5_matrix(tmp, "data/matrix")

dim(X)    # c(10, 10)
nrow(X)   # 10
ncol(X)   # 10

X$close()
unlink(tmp)



BigDataStatMeth documentation built on May 15, 2026, 1:07 a.m.