Description Usage Arguments Value Examples
View source: R/scanList_matList_conversion.R
To back-transform an igraphSN
object into a scanList
object, users can use
igraph2scanList()
, wrapper to igraph2array()
that
handles attributes list attrs
1 | scanList2igraph(scan.list)
|
scan.list |
a 3 dimensional array representing adjacency matrices (first 2 dimensions) throughout the different scans (3rd dimension) |
an igraphSN
object:
the igraph
network object obtained from the weighted adjacency matrix corresponding to the
inputted scanList
the attrs
attributes list carried over from the inputted scanList
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | set.seed(42)
n <- 5L
samp.effort <- 100L
# Adjacency matrix import
## random directed adjacency matrix
Adj <- sample(1:samp.effort,n * n) |>
matrix(nrow = 5,dimnames = list(letters[1:n],letters[1:n]))
Adj[lower.tri(Adj,diag = TRUE)] <- 0L
Adj
sL <- simunet(Adj,samp.effort,"upper",10)
G <- sL |> scanList2igraph()
G
G |> igraph2scanList()
G |> igraph2scanList(format = "scanList")
identical(G |> igraph2scanList(format = "scanList"),sL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.