nrow-MultiBlock-method: nrow for MultiBlock

nrow,MultiBlock-methodR Documentation

nrow for MultiBlock

Description

Return the number of rows (samples) in each block of a MultiBlock. For a valid MultiBlock all blocks share the same number of rows, so the result is a named integer vector with one (identical) value per block.

Usage

## S4 method for signature 'MultiBlock'
nrow(x)

Arguments

x

A MultiBlock object.

Value

A named integer vector with the number of rows per block.

Examples

b1 <- matrix(rnorm(500), 10, 50)
b2 <- matrix(rnorm(800), 10, 80)
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))
nrow(mb) # c(b1 = 10, b2 = 10)

R.ComDim documentation built on May 13, 2026, 9:07 a.m.