toLookupTable: Keys and Values or List to Lookup Table

View source: R/lookup.R

toLookupTableR Documentation

Keys and Values or List to Lookup Table

Description

Convert vectors of keys and values or a list into a lookup table (data frame)

Usage

toLookupTable(
  keys = NULL,
  values = NULL,
  List = NULL,
  as.twoColumnTable = FALSE,
  stringsAsFactors = FALSE
)

Arguments

keys

keys of the lookup table

values

values of the lookup table

List

list of named elements with the names representing the keys and the values representing the values of the lookup table

as.twoColumnTable

if TRUE (the default is FALSE) the result is a data frame with two columns keys and values, respectively.

stringsAsFactors

passed to data.frame

Value

data frame with one row containing values in columns named keys or, if as.twoColumnTable = TRUE, a data frame with the keys in column key and the values in column value


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