count_nonNA: Count number of times edges have not been observed For...

Description Usage Arguments Value See Also Examples

View source: R/expDesign_building.blocks.R

Description

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

Usage

1
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

simunet(), design_exp(), perform_exp()], count_NA().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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

# social network simulations
## theoretical scans
sL <- simunet(Adj = Adj,samp.effort = samp.effort,mode = "directed",n.scans = 120L)
sL

## group-scan sampling
sL |> perform_exp(design_sampling("group",.6)) |> count_nonNA()

R-KenK/SimuNet documentation built on Oct. 22, 2021, 1:27 a.m.