lookupQT: Hash Table/Dictionary Lookup These functions were originally...

lookupQTR Documentation

Hash Table/Dictionary Lookup These functions were originally contained in "qdapTools" version 1.3.4 lookup - data.table based hash table useful for large vector lookups.

Description

Hash Table/Dictionary Lookup

These functions were originally contained in "qdapTools" version 1.3.4 lookup - data.table based hash table useful for large vector lookups.

Usage

lookupQT(terms, key.match, key.reassign = NULL, missing = NA)

Arguments

terms

A vector of terms to undergo a lookup.

key.match

Takes one of the following: (1) a two column data.frame of a match key and reassignment column, (2) a named list of vectors (Note: if data.frame or named list supplied no key reassign needed) or (3) a single vector match key.

key.reassign

A single reassignment vector supplied if key.match is not a two column data.frame/named list.

missing

Value to assign to terms not matching the key.match. If set to NULL the original values in terms corresponding to the missing elements are retained.

Value

Outputs A new vector with reassigned values.

Author(s)

Tyler Rinker ('qdapTools' package version 1.3.4)


iemisc documentation built on Sept. 25, 2023, 5:09 p.m.