scanList
as expDesign
, even as user-defined
functionsR/expDesign_building.blocks.R
remove_mostPeripheral.Rd
Written as a S3 method to be applied to scanList
or sLlist
(list of scanList
) objects.
remove_mostPeripheral(scan.list, ...)
scan.list | a |
---|---|
... | additional arguments to be passed. At the moment At the moment |
a scanList
, or list of such, in which the most peripheral node has been removed. See
also simunet()
.
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])) Adj[lower.tri(Adj,diag = FALSE)] <- 0L Adj#> a b c d e #> a 49 228 47 165 111 #> b 0 146 24 110 131 #> c 0 0 71 20 41 #> d 0 0 0 154 227 #> e 0 0 0 0 27# social network simulations ## theoretical scans sL <- simunet(Adj = Adj,samp.effort = samp.effort,mode = "upper",n.scans = 120L)#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs produced#> Warning: NAs producedsL#> #> scan: 1 #> a NA 1 . 1 1 #> b . NA . 1 . #> c . . NA . . #> d . . . NA 1 #> e . . . . NA #> #> scan: 2 #> a NA 1 . . . #> b . NA 1 1 1 #> c . . NA . . #> d . . . NA 1 #> e . . . . NA #> #> ... ( 117 more scans) #> #> scan: 120 #> a NA 1 1 . 1 #> b . NA . 1 . #> c . . NA . . #> d . . . NA 1 #> e . . . . NA #> #> #> 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")) |> remove_mostPeripheral()#> #> scan: 1 #> a . NA NA NA #> b . . NA NA #> d . . . NA #> e . . . . #> #> scan: 2 #> a . 1 NA NA #> b . . 1 1 #> d . . . NA #> e . . . . #> #> ... ( 117 more scans) #> #> scan: 120 #> a . NA NA 1 #> b . . NA . #> d . . . 1 #> e . . . . #> #> #> Hidden attributes: #> scanList.type - raw.scanList - Adj - samp.effort - n.scans - mode #> Adj.subfun - edge.Prob - focalList - theoretical.scanList