as.blockmatrix {blockmatrix}R Documentation

as.blockmatrix S3 method for blockmatrix, matrix and NULL object

Description

as.blockmatrix S3 method for blockmatrix, matrix and NULL object

Usage

  as.blockmatrix(M = NULL, ...)

  ## Default S3 method:
 as.blockmatrix(M, adjust_zero = TRUE,
    zero_element = "0", ...)

  ## S3 method for class 'blockmatrix'
 as.blockmatrix(M,
    adjust_zero = TRUE, add_zero_matrix = FALSE,
    zero_element = "0", ...)

  ## S3 method for class 'matrix'
 as.blockmatrix(M, nrowe = 2, ncole = 2,
    nrow = NULL, ncol = NULL, adjust_zero = TRUE,
    zero_element = "0", ...)

Arguments

M

a matrix or blockmatrix object

nrowe

number of rows for each block (element of the blockmatrix)

ncole

number of columns for each block (element of the blockmatrix)

nrow

number of rows for block-matrix

ncol

number of columns of blockmatrix

adjust_zero

logical value. If TRUE (Default) it replaces the zero matrices with zero_element.

add_zero_matrix

logical value. If TRUE it adds a zero-element element matrix as an object called zero_element in the blockmatrix

zero_element

see ncol_elements or nrow_elements

...

further arguments

Author(s)

Emanuele Cordano


[Package blockmatrix version 1.0 Index]