matrix_to_mapping: Convert mapping matrix to filter mapping specification.

View source: R/module_snapshot_manager.R

matrix_to_mappingR Documentation

Convert mapping matrix to filter mapping specification.

Description

Transform a mapping matrix, i.e. a data frame that maps each filter state to each module, to a list specification like the one used in the mapping attribute of teal_slices. Global filters are gathered in one list element. If a module has no active filters but the global ones, it will not be mentioned in the output.

Usage

matrix_to_mapping(mapping_matrix)

Arguments

mapping_matrix

(data.frame) of logical vectors where columns represent modules and row represent teal_slices

Value

Named list like that in the mapping attribute of a teal_slices object.


teal documentation built on May 29, 2024, 10:11 a.m.