View source: R/diffnet-methods.r
| as.array.diffnet | R Documentation |
Coerce a diffnet graph into an array
## S3 method for class 'diffnet'
as.array(x, ...)
x |
A diffnet object. |
... |
Ignored. |
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.
A three-dimensional array of T matrices of size n\times n.
diffnet.
Other diffnet methods:
%*%(),
c.diffnet(),
diffnet-arithmetic,
diffnet-class,
diffnet_index,
plot.diffnet(),
summary.diffnet()
# Creating a random diffnet object
set.seed(84117)
mydiffnet <- rdiffnet(30, 5)
# Coercing it into an array
as.array(mydiffnet)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.