makeAdjacencyMatrixFromList: Wrangle anansi dictionary list into binary adjacency matrix

View source: R/weaveWebFromTables.R

makeAdjacencyMatrixFromListR Documentation

Wrangle anansi dictionary list into binary adjacency matrix

Description

Takes the anansi dictionary in list format and wrangles it into a binary adjacency matrix based on which tableY features are present in both the dictionary and tableY. For general use, should probably not be called directly, but rather through weaveWebFromTables.

Usage

makeAdjacencyMatrixFromList(tableY = NULL, dict_list, mode = "interaction")

Arguments

tableY

A matrix containing features of interest. Rows should be samples and columns should be features.

dict_list

A list that has tableY names as entries in the case of mode == "interaction" and groupnames in the case of mode == "membership". For general use, we recommend using the one provided in this package.

mode

A character vector. Can be "interaction" or "membership". Toggles whether to link two datasets based on their interactions or based on shared group membership.

Value

a binary adjacency matrix with the group members on both the rows and columns.

See Also

weaveWebFromTables


thomazbastiaanssen/anansi documentation built on Feb. 9, 2025, 2:07 p.m.