count_motifs: Count multi-level motifs

Description Usage Arguments Value Examples

View source: R/count_motifs.R

Description

Count multi-level motifs

Usage

1
2
3
4
5
6
7
8
count_motifs(
  net,
  motifs,
  lvl_attr = c("sesType"),
  assume_sparse = TRUE,
  omit_total_result = TRUE,
  directed = NULL
)

Arguments

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. list("1,2[I.C]")

lvl_attr

character vector specifying the vertex attribute name where level information is stored in net

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 (NULL), this is determined automatically using the structure of the provided network object

Value

data frame with a column containing motif identifier strings and one column containing motif counts

Examples

1
2
3
4
5
6
7
8
## Not run: 
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
)

## End(Not run)

motifr documentation built on Dec. 15, 2020, 5:23 p.m.