is_valid_lookup_tbl | R Documentation |
This function verifies that a lookup table meets the required structural conditions for key-based lookups. It checks that key columns are of type integer (or factors stored as integers), that each key column has a consecutive sequence of values, and that the table has the expected number of rows based on all possible combinations of key values.
is_valid_lookup_tbl(lookup_tbl, keycols, fixkey = FALSE)
lookup_tbl |
The data.table representing the lookup table. |
keycols |
A character vector specifying the key columns in the lookup table. |
fixkey |
Logical. If TRUE, the function will automatically set the key of the lookup table to the provided key columns for best performance; default is FALSE. |
TRUE if the lookup table is valid; otherwise, an error is raised.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.