Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

graphs_find_subgraphs

Subgraphs in Undirected Graphs/Networks


Description

Finding and indexing subgraphs in undirected graph.

Usage

graphs_find_subgraphs(id_1, id_2, verbose = 1L)

Arguments

id_1

vector of integers indicating ids

id_2

vector of integers indicating ids

verbose

in integer indicating the amount of verbosity; good for long running tasks or to get more information about the workings of the algorithm; currently accepted values: 0, 1, 2

Details

Input is given as two vectors where each pair of node ids 'id_1[i]' - 'id_2[i]' indicates an edge between two nodes.

Value

An integer vector with subgraph ids such that each distinct subgraph - i.e. all nodes are reachable within the graph and no node outside the subgraph is reachable - gets a distinct integer value. Integer values are assigned via

Examples

graphs_find_subgraphs(c(1,2,1,5,6,6), c(2,3,3,4,5,4), verbose = 0)
graphs_find_subgraphs(c(1,2,1,5,6,6), c(2,3,3,4,5,4), verbose = 2)

dsmisc

Data Science Box of Pandora Miscellaneous

v0.3.3
GPL (>= 2)
Authors
Peter Meissner [aut, cre]
Initial release
2020-09-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.