common_subgraph_stats {memnet} | R Documentation

## Common subgraph statistics

### Description

Function identifies the common subgraphs of two networks and returns the networks statistics using network_stats.

### Usage

    common_subgraph_stats(adj_1, adj_2, giant = FALSE, weights_1 = NULL,
      weights_2 = NULL, mode_1 = "undirected", mode_2 = "undirected")

### Arguments

`adj_1` | numeric matrix representing the adjacency matrix of graph 1.
`adj_2` | numeric matrix representing the adjacency matrix of graph 2.
`giant` | logical specifying whether the should be computed for the largest component.
`weights_1` | numeric vector of edge weights for network 1 and 2, respectively. Optional.
`weights_2` | numeric vector of edge weights for network 1 and 2, respectively. Optional.
`mode_1` | character, either `"directed"` or `"undirected"`, specifying whether network 1 and 2 should be interepeted as directed or undirected, respectively. Defaults to `"undirected"`.
`mode_2` | character, either `"directed"` or `"undirected"`, specifying whether network 1 and 2 should be interepeted as directed or undirected, respectively. Defaults to `"undirected"`.

### Value

List containing the two subgraphs.

### Examples

    # get fluency data
    data(animal_fluency)

    # edge lists of fluency graphs
    edge_list_1 = threshold_graph(animal_fluency[1:100])
    edge_list_2 = threshold_graph(animal_fluency[101:200])

    # get adjacency matrices
    adj_1 = edg_to_adj(edge_list_1)
    adj_2 = edg_to_adj(edge_list_2)

    # get structural overview of both networks
    common_subgraph_stats(adj_1, adj_2)

[Package memnet version 0.1.0 Index]