make_fun_from_list: Create a mapping function from list

Description Usage Arguments Details Value Author(s)

Description

Creates a mapping function from list

Usage

1

Arguments

lst

A list

Details

Turns a list of the form list(a=c(1,2), b=3) into a function that returns 'a' when given 1 or 2 as argument, 'b' when given 3 and otherwise gives back its argument unchanged.

This is a convenience function to make it possible to specify onto mappings using lists. The map_* functions use it internally, but you might find a a use for it.

Value

A function that inverts the mapping specified by lst

Author(s)

Will Lowe


events documentation built on May 2, 2019, 4:45 p.m.