scanList
, an edge that is observed during a scan is not NA
(it will be either
0 or 1). This function counts how many time this was the case in the inputted scan.list
for
each edge.R/expDesign_building.blocks.R
count_nonNA.Rd
Written as a S3 method to be applied to scanList
or sLlist
(list of scanList
) objects.
count_nonNA(scan.list, ...)
scan.list | a |
---|---|
... | additional arguments to be passed. At the moment At the moment |
an integer matrix, or list of such, representing how many time each edge has been sampled
(i.e. was not NA
). Inherits from weightedAdj
and the previous scanList
class (theoretical or
empirical, inheriting from scanList
), and keeps track of the scan.list
's list of attributes
attrs
.
simunet()
, design_exp()
, perform_exp()
], count_NA()
.
set.seed(42) n <- 5L samp.effort <- 241L # 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])) diag(Adj) <- 0L Adj#> a b c d e #> a 0 228 47 165 111 #> b 229 0 24 110 131 #> c 65 122 0 20 41 #> d 153 241 100 0 227 #> e 74 128 89 114 0# social network simulations ## theoretical scans sL <- simunet(Adj = Adj,samp.effort = samp.effort,mode = "directed",n.scans = 120L) sL#> #> scan: 1 #> a . 1 . 1 . #> b 1 . . . . #> c . . . . . #> d . 1 1 . 1 #> e . . 1 . . #> #> scan: 2 #> a . 1 . . . #> b 1 . . 1 . #> c 1 1 . . . #> d . 1 . . 1 #> e . . 1 1 . #> #> ... ( 117 more scans) #> #> scan: 120 #> a . 1 . 1 1 #> b 1 . . 1 . #> c . 1 . . . #> d 1 1 . . 1 #> e . 1 1 . . #> #> #> Hidden attributes: #> scanList.type - raw.scanList - Adj - samp.effort - n.scans - mode #> Adj.subfun - edge.Prob#> #> Weighted adjacency matrix #> a . 71 66 76 65 #> b 70 . 79 72 75 #> c 77 64 . 66 66 #> d 75 63 65 . 80 #> e 67 67 71 75 . #> #> #> Hidden attributes: #> scanList.type - raw.scanList - Adj - samp.effort - n.scans - mode #> Adj.subfun - edge.Prob - obs.P - theoretical.scanList