Create empty 0x0 matrices of varying types

EmptyMatrix(repr = "C", type = "d")

Arguments

repr

Representation of empty matrix; choose from:

type

Type of resulting matrix to return, choose from:

  • d” for numeric matrices

  • l” for logical matrices

  • n” for pattern matrices

Note, when repr is “spam”, type must be “d”; when repr is “d”, setting type to “n” returns a logical matrix

Value

A 0x0 matrix of the specified representation and type

See also

Examples

EmptyMatrix()
#> 0 x 0 sparse Matrix of class "dgCMatrix"
#> <0 x 0 matrix>
EmptyMatrix("spam")
#> <0 x 0 matrix>
#> Class 'spam' (32-bit)