set_lookup_tbl_key: Set Lookup Table Key

View source: R/lookup_dt.R

set_lookup_tbl_keyR Documentation

Set Lookup Table Key

Description

Sets the key columns of a lookup table to optimize performance for lookup operations. The key columns are sorted (with a priority given to "year" if present) and then set as the key for the data.table.

Usage

set_lookup_tbl_key(lookup_tbl, keycols)

Arguments

lookup_tbl

A data.table whose key columns are to be set.

keycols

A character vector specifying the key columns to be used.

Value

The original lookup table (invisibly) with its key set for efficient subsetting.


ChristK/CKutils documentation built on April 11, 2025, 10:11 p.m.