Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

13_other_conversion_functions

Other Conversion Functions


Description

Functions to convert ObjectArrays to lists, and NestMatrix and SectMatrix objects to matrices.

Usage

## S3 method for class 'ObjectArray'
as.list(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

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

Advanced Vector Toolkit

v0.2.0
GPL (>= 2)
Authors
Abby Spurdle
Initial release
2020-10-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.