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

add_scans(scan.list, ...)

Arguments

scan.list

a scanList or sLlist object. See objects returned by simunet()

...

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

add_scans() can use argument:

  • new.scans: integer scalar, the number of additional new scans to be performed and added to the scan.list

Value

a scanList, or list of such, to which additional scans have been added to the 3D array. See also simunet().

Also modifies these attributes to attrs:

  • n.scans: integer indicating how many scans have been performed in total. n.scans itself has the attribute scans.performed that keeps track of what "batches" of scans have been performed, by growing a vector of "scan batch" sizes

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
## focal-scan sampling sL |> perform_exp(design_sampling("focal","even")) |> add_scans(50)
#> #> scan: 1 #> a . 1 . 1 . #> b 1 . NA NA NA #> c . NA . NA NA #> d . NA NA . NA #> e . NA NA NA . #> #> scan: 2 #> a . NA NA . NA #> b NA . NA 1 NA #> c NA NA . . NA #> d . 1 . . 1 #> e NA NA NA 1 . #> #> ... ( 167 more scans) #> #> scan: 170 #> a . 1 . 1 . #> b 1 . 1 1 1 #> c . 1 . . . #> d . 1 . . 1 #> e . . 1 1 . #> #> #> Hidden attributes: #> scanList.type - raw.scanList - Adj - samp.effort - n.scans - mode #> Adj.subfun - edge.Prob - focalList - theoretical.scanList