Description Usage Arguments Value Examples
View source: R/scanList_tools.R
Shortcut to a lapply
equivalent to apply a function to a list of scanList
: a sLlist
object
Written analogously to lapply()
1 |
sLlist |
a |
FUN |
function, to be applied to each |
... |
extra argument to be passed, notably named arguments used by |
a sLlist
object, a list of scanList
objects on which the function FUN
has been
applied (see perform_exp()
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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
# Designing the experiments:
## setting a constant probability of not observing edges
group.scan <- design_sampling(method = "group",sampling = 0.8)
## setting an even focal sampling
focal.scan <- design_sampling(method = "focal",sampling = "even")
sL <- simunet(Adj = Adj,samp.effort = samp.effort,mode = "upper",n.scans = 120L)
sL |> perform_exp(group.scan,focal.scan) |> sLlapply(attrs,a = "edge.Prob")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.