misc_extract_components function

Component extraction of miscellaneous graph formats

Component extraction of miscellaneous graph formats

This function extracts all components of the input with various formats and converts them to "igraph" objects.

misc_extract_components( x, directed = TRUE, mode = "directed", weighted = NULL, unibipartite = FALSE, diag = TRUE )

Arguments

  • x: The input can be an edgelist, an adjacency matrix, or a graphNEL object.
  • directed: Whether to create a directed graph. (default = TRUE)
  • mode: Character scalar, explains how to interpret the supplied matrix. Possible values are: "directed", "undirected", "upper", "lower", "max", "min", "plus". (default = "directed")
  • weighted: An argument for specifying whether the graph should be weighted or not. If it is NULL, then an unweighted graph is created. (default = NULL)
  • unibipartite: A boolean parameter describing whether the input edge list corresponds to a bipartite graph. A TRUE value specifies a bipartite graph, and vice versa. (default = FALSE)
  • diag: Logical scalar, whether to consider the diagonal of the matrix or not. If it is FALSE, then the diagonal is treated as zeros. (default = TRUE)

Returns

A list including the components of the input graph as igraph objects. Each element of the list represents a component and is an igraph object. The components are disconnected subgraphs of the input graph.

Details

This function extracts components from the input object, which can be an edgelist, an adjacency matrix, or a graphNEL object. The result is a list including the components represented as separate graphs.

See Also

induced.subgraph, components, graph_from_adjacency_matrix

Author(s)

Minoo Ashtiani, Mehdi Mirzaie, Mohieddin Jafari

  • Maintainer: Minoo Ashtiani
  • License: GPL-3
  • Last published: 2023-08-08

Useful links