nmf.rrr.rename: Rename decoder and encoder bases

View source: R/nmfae.R

nmf.rrr.renameR Documentation

Rename decoder and encoder bases

Description

Assigns user-specified names to the decoder (X1 columns) and encoder (X2 rows) bases of an nmfae object. The names propagate to \Theta, the coefficients table, and all downstream displays such as summary, nmfae.DOT, and nmfae.heatmap.

Usage

nmf.rrr.rename(x, X1.colnames = NULL, X2.rownames = NULL)

Arguments

x

An object of class "nmfae" returned by nmf.rrr.

X1.colnames

Character vector of length Q for decoder bases (columns of X_1 / rows of \Theta). If NULL (default), the decoder names are left unchanged.

X2.rownames

Character vector of length R for encoder bases (rows of X_2 / columns of \Theta). If NULL (default), the encoder names are left unchanged.

Value

A modified copy of x with updated names.

See Also

nmf.rrr

Examples


set.seed(1)
Y <- matrix(runif(15), nrow = 3)
res <- nmf.rrr(Y, rank1 = 2, rank2 = 2)
res <- nmf.rrr.rename(res,
  X1.colnames = c("Resp1", "Resp2"),
  X2.rownames = c("Cov1", "Cov2"))
summary(res)


nmfkc documentation built on Oct. 30, 2026, 9:06 a.m.