components_id: Components

View source: R/structure.R

components_idR Documentation

Components

Description

This function assigns an id to the components that each of the nodes of the matrix belongs

Usage

components_id(A)

Arguments

A

A matrix

Value

A vector assigning an id the components that each of the nodes of the matrix belongs

Author(s)

Alejandro Espinosa-Rada

References

Wasserman, S. and Faust, K. (1994). Social network analysis: Methods and applications. Cambridge University Press.

Examples


A <- matrix(c(
  0, 1, 1, 0, 0,
  1, 0, 1, 0, 0,
  1, 1, 0, 0, 0,
  0, 0, 0, 0, 1,
  0, 0, 0, 1, 0
), byrow = TRUE, ncol = 5)
rownames(A) <- letters[1:ncol(A)]
colnames(A) <- rownames(A)
components_id(A)

anespinosa/netmem documentation built on April 5, 2025, 5:02 p.m.