as.array.diffnet: Coerce a diffnet graph into an array

View source: R/diffnet-methods.r

as.array.diffnetR Documentation

Coerce a diffnet graph into an array

Description

Coerce a diffnet graph into an array

Usage

## S3 method for class 'diffnet'
as.array(x, ...)

Arguments

x

A diffnet object.

...

Ignored.

Details

The function takes the list of sparse matrices stored in x and creates an array with them. Attributes and other elements from the diffnet object are dropped.

dimnames are obtained from the metadata of the diffnet object.

Value

A three-dimensional array of T matrices of size n\times n.

See Also

diffnet.

Other diffnet methods: %*%(), c.diffnet(), diffnet-arithmetic, diffnet-class, diffnet_index, plot.diffnet(), summary.diffnet()

Examples

# Creating a random diffnet object
set.seed(84117)
mydiffnet <- rdiffnet(30, 5)

# Coercing it into an array
as.array(mydiffnet)

srdyal/diffusiontest documentation built on Dec. 9, 2024, 1:14 a.m.