compute_node_adjacency: Computes the adjacency matrix.

View source: R/One_D_Mapper.R

compute_node_adjacencyR Documentation

Computes the adjacency matrix.

Description

It computes the adjacency matrix between nodes. Two nodes are considered connected if they share at least one individual.

Usage

compute_node_adjacency(nodes_list)

Arguments

nodes_list

Output of the levels_to_nodes function. List of character vectors. Each of the vectors contains the names of the individuals at each node.

Value

It returns a matrix of magnitude n nodes x n nodes that stores a 1 if there are shared samples in two given nodes and a 0 otherwise.


GSSTDA documentation built on June 22, 2024, 10:44 a.m.