weightedAdj2scanList: Convert 'weightedAdj' into 3D binary array 'scanList' objects...

Description Usage Arguments Value Examples

View source: R/scanList_matList_conversion.R

Description

Convert weightedAdj into 3D binary array scanList objects Back-transform weightedAdjinto the scanList it was summed from (see sum_scans())

Usage

1

Arguments

sum

a weightedAdj object

Value

scanList object. See simunet()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)
wAdj <- sL |> sum_scans()
wAdj
wAdj |> weightedAdj2scanList()
identical(wAdj |> weightedAdj2scanList(),sL)

R-KenK/SimuNet documentation built on Oct. 22, 2021, 1:27 a.m.