36_other_conversion_functions: Other Conversion Functions

Description Usage Arguments Examples

Description

Functions to convert ObjectArray(s) to lists, and NestMatrix and SectMatrix objects to matrices.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'ObjectArray'
as.list(x, ...)

## S3 method for class 'MImage'
as.list(x, ...)
## S3 method for class 'SImage'
as.matrix(x, ...)

## S3 method for class 'NestMatrix'
as.matrix(x, ...)
## S3 method for class 'SectMatrix'
as.matrix(x, ...)

Arguments

x

An ObjectArray/NestMatrix or PartMatrix/SectMatrix object.
Note that nested matrices need to be conformable and non-recursive.

...

Ignored.

Examples

1
2
3
4
5
6
7
8
x <- NestMatrix (2, 2)
x [[1, 1]] <- matrix ("AA", 2, 2)
x [[1, 2]] <- matrix ("AB", 2, 2)
x [[2, 1]] <- matrix ("BA", 2, 2)
x [[2, 2]] <- matrix ("BB", 2, 2)

x
as.matrix (x)

vectools documentation built on June 7, 2021, 9:08 a.m.