Count multi-level motifs
count_motifs( net, motifs, lvl_attr = c("sesType"), assume_sparse = TRUE, omit_total_result = TRUE, directed = NULL )
net | A network object with a node attribute specifying the level of each node |
---|---|
motifs | a list of motif identifiers which shall be counted, e.g.
|
lvl_attr | character vector specifying the vertex attribute name where
level information is stored in |
assume_sparse | whether the network shall be assumed to be sparse (for optimization), default TRUE |
omit_total_result | whether total results shall be omitted, default FALSE |
directed | whether the graph shall be treated as a directed graph. Per
default ( |
data frame with a column containing motif identifier strings and one column containing motif counts
# \dontrun{ count_motifs(ml_net, lvl_attr = c("sesType"), motifs = list("1,2[I.C]", "1,2[II.C]", "2,1[I.C]", "2,1[II.C]"), directed = FALSE )#> motif count #> 1,2[I.C] 1,2[I.C] 543 #> 1,2[II.C] 1,2[II.C] 167 #> 2,1[I.C] 2,1[I.C] 217 #> 2,1[II.C] 2,1[II.C] 7# }