nblocks: Number of Blocks

Description Usage Arguments Value See Also Examples

Description

return the number of blocks of a multiblock object

Usage

1
  nblocks(x)

Arguments

x

a multiblock object

Value

the number of blocks

See Also

blockdim

Examples

1
2
3
4
5
6
7
# create some block-matrices
A = blockmatrix(matrix(1:12, 3, 4), 3, c(2,2))
B = blockmatrix(matrix(1:20, 5, 4), c(3,2), c(2,2))

# number of blocks
nblocks(A)
nblocks(B)

gastonstat/blockberry documentation built on May 16, 2019, 5:44 p.m.