% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/S3_dimnames.R
\name{dimnames.HDF5Matrix}
\alias{dimnames.HDF5Matrix}
\alias{rownames.HDF5Matrix}
\alias{colnames.HDF5Matrix}
\alias{rownames<-.HDF5Matrix}
\alias{colnames<-.HDF5Matrix}
\title{Get dimension names of an HDF5Matrix}
\usage{
\method{dimnames}{HDF5Matrix}(x)

rownames.HDF5Matrix(x, do.NULL = TRUE, prefix = "row")

colnames.HDF5Matrix(x, do.NULL = TRUE, prefix = "col")

\method{rownames}{HDF5Matrix}(x) <- value

\method{colnames}{HDF5Matrix}(x) <- value
}
\arguments{
\item{x}{An \code{HDF5Matrix} object}

\item{do.NULL}{Logical. Ignored; present for base compatibility.}

\item{prefix}{Character. Ignored; present for base compatibility.}

\item{value}{Character vector of column names, or \code{NULL} to remove.}
}
\value{
A list of length 2 with elements \code{[[1]]} (rownames) and
\code{[[2]]} (colnames), or \code{NULL} for dimensions without names.
Returns \code{NULL} when neither dimension has names.
}
\description{
Returns the row and column names stored alongside the HDF5 dataset,
following the BigDataStatMeth convention. Returns \code{NULL} when no
names have been stored for a given dimension.
}
\examples{
\donttest{
tmp <- tempfile(fileext = ".h5")

m <- matrix(1:6, 2, 3,
            dimnames = list(c("r1","r2"), c("c1","c2","c3")))

X <- hdf5_create_matrix(tmp, "data/mat", data = m)

dimnames(X)
rownames(X)
colnames(X)
rownames(X) <- c("row1", "row2")
rownames(X)
hdf5_close_all()
unlink(tmp)

}

}
