list_motifs {motifr} | R Documentation |
Lists motifs of a given class or all motifs with a given signature
Description
Returns a dataframe with one row for each instance of the motif specified by
the given motif identifier string. If the identifier string specifies a motif
class, e.g. 1,2[I.A]
, then only motifs of the given class are returned.
If the identifier string specifies a signature, e.g. 1,2
, then a full
list of all motifs of this signature is returned. In the latter case, the
dataframe contains an additional column stating the classes of the motifs.
The naming scheme of the columns is as follows: Each column is called
levelA_nodeB
where A
is the lvl_attr
of the nodes in the column
and B
the index of the nodes among the nodes on the same level. This
index stems from the internal order of the nodes and does not carry any
specific meaning.
Usage
list_motifs(net, identifier, lvl_attr = "sesType", directed = NULL)
Arguments
net |
network object |
identifier |
motif identifier string (with or without class, see above) |
lvl_attr |
character vector specifying the attribute name where level
information is stored in |
directed |
whether the graph shall be treated as a directed graph. Per
default ( |
Value
data frame with one row for each motif
Examples
## Not run:
head(list_motifs(ml_net, "1,2[I.C]", directed = FALSE))
## End(Not run)