get_preimage: Take in a function from one finite set of strings to another...

Description Usage Details

View source: R/utilities.R

Description

Take in a function from one finite set of strings to another in the form of a named vector 'map'. (Inputs are names, outputs are values.) Return its preimage as a named list of vectors.

Usage

1
get_preimage(map, detailed_output = F)

Details

If 'detailed_output', returns a list with named elements: - 'preimage': a list where each name is an output (a value of 'map') and each element is a vector of all inputs leading to that output. - 'output_occurs_multiple': a named list or vector subsetted from 'map' where each element occurs more than once. - 'output_occurs_once': a named list or vector subsetted from 'map' where each element occurs once. Otherwise, it returns just the preimage.


maehrlab/thymusatlastools documentation built on May 28, 2019, 2:32 a.m.