This object is the workhorse of the
tplyr package. A
tplyr_layer can be thought of as a block, or "layer" of a table.
Summary tables typically consist of different sections that require different
summaries. When programming these section, your code will create different
layers that need to be stacked or merged together. A
the container for those isolated building blocks.
When building the
tplyr_table, each layer will execute independently.
When all of the data processing has completed, the layers are brought
together to construct the output.
tplyr_layer. Required. The parent environment of the layer. This must be either the
tplyr_tableobject that the layer is contained within, or another
tplyr_layerobject of which the layer is a subgroup.
Symbol. Required, The variable name on which the summary is to be performed. Must be a variable within the target dataset. Enter unquoted - i.e. target_var = AEBODSYS.
A string, a variable name, or a list of variable names supplied using
Call. Filter logic used to subset the target data when performing a summary.
"count", "desc", or "shift". Required. The category of layer - either "counts" for categorical counts, "desc" for descriptive statistics, or "shift" for shift table counts
tplyr_layer environment that is a child of the specified
parent. The environment contains the object as listed below.
This is an attribute. A string indicating the layer type, which controls the summary that will be performed.
A quosure of a name, which is the variable on which a summary will be performed.
A list of quosures representing either text labels or variable names used in grouping. Variable names must exist within the target dataset Text strings submitted do not need to exist in the target dataset.
A list of quosures used to determine the variables that are used to display in columns.
A quosure of a call that containers the filter logic used to subset the target dataset. This filtering is in addition to any subsetting done based on
wherecriteria specified in
A list with class
tplyr_layer_container. Initialized as empty, but serves as the container for any sublayers of the current layer. Used internally.
Different layer types will have some different bindings specific to that layer's needs.