Written as a S3 method to be applied to scanList or sLlist (list of scanList) objects.

count_nonNA(scan.list, ...)

Arguments

scan.list

a scanList or sLlist object, where an unobserved edge (whether it is 0 or 1) is NA. See objects returned by simunet()

...

additional arguments to be passed. At the moment scale_scans() does not use

At the moment count_nonNA() does not use additional argument, arguments passed will be ignored.

Value

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.

See also

Examples

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
## group-scan sampling sL |> perform_exp(design_sampling("group",.6)) |> count_nonNA()
#> #> 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