tableLookup: Lookup Value for Key in Table

View source: R/lookup.R

tableLookupR Documentation

Lookup Value for Key in Table

Description

lookup a value in the second column of a data frame x where the value in the first column matches the key.

Usage

tableLookup(x, key, default = NULL)

Arguments

x

data frame with at least two columns. Keys are expected to be in the first and values are expected to be in the second column, respectively.

key

key for which a value is to be looked up

default

default value that is returned if the key is not a key of the lookup table

Value

value looked up in the lookup table of default if key is not contained in the first column of the lookup table x


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.