create_motifs() is used to create a list of networks that represent the subgraphs or motifs corresponding to a certain number of nodes and direction. Note that currently only n==2 to n==4 is implemented, and the latter only for undirected networks.

create_motifs(n, directed = FALSE)

Arguments

n

Given:

  • A single integer, e.g. n = 10, a one-mode network will be created.

  • A vector of two integers, e.g. n = c(5,10), a two-mode network will be created.

  • A manynet-compatible object, a network of the same dimensions will be created.

directed

Logical whether the graph should be directed. By default directed = FALSE. If the opposite direction is desired, use to_redirected() on the output of these functions.