Skip to contents

Manages a global data model by either setting new data keys or retrieving the current ones. The data model consists of named lists containing column names and their associated key columns.

Usage

set_data_keys(data_keys = NULL)

Arguments

data_keys

Optional list of lists. Each inner list must contain:

  • cols: A vector containing the column names for the data

  • keys: A vector specifying the key columns

If NULL, returns the current data model.

Value

  • If data_keys = NULL: Returns the current global data model

  • If data_keys provided: Sets the new data model and returns invisibly

Examples

set_data_keys(cattle_data_keys)
#> Error: object 'cattle_data_keys' not found