teal_data-class: Reproducible data

teal_data-classR Documentation

Reproducible data

Description

Reproducible data container class. Inherits code tracking behavior from teal.code::qenv.

Details

This class provides an isolated environment in which to store and process data with all code being recorded. The environment, code, data set names, and data joining keys are stored in their respective slots. These slots should never be accessed directly, use the provided get/set functions.

As code is evaluated in teal_data, messages and warnings are stored in their respective slots. If errors are raised, a qenv.error object is returned.

Slots

env

(environment) environment containing data sets and possibly auxiliary variables. Access variables with get_var() or [[[]. No setter provided. Evaluate code to add variables into ⁠@env⁠.

code

(character) vector representing code necessary to reproduce the contents of ⁠@env⁠. Access with get_code(). No setter provided. Evaluate code to append code to the slot.

id

(integer) random identifier assigned to each element of ⁠@code⁠. Used internally.

warnings

(character) vector of warnings raised when evaluating code. Access with get_warnings().

messages

(character) vector of messages raised when evaluating code.

join_keys

(join_keys) object specifying joining keys for data sets in ⁠@env⁠. Access or modify with join_keys().

datanames

(character) vector of names of data sets in ⁠@env⁠. Used internally to distinguish them from auxiliary variables. Access or modify with datanames().

verified

(logical(1)) flag signifying that code in ⁠@code⁠ has been proven to yield contents of ⁠@env⁠. Used internally. See verify() for more details.


teal.data documentation built on May 29, 2024, 8:03 a.m.