build: Trigger the execution of the 'tplyr_table'

View source: R/build.R

buildR Documentation

Trigger the execution of the tplyr_table


The functions used to assemble a tplyr_table object and each of the layers do not trigger the processing of any data. Rather, a lazy execution style is used to allow you to construct your table and then explicitly state when the data processing should happen. build triggers this event.


build(x, metadata = FALSE)



A tplyr_table object


Trigger to build metadata. Defaults to FALSE


When the build command is executed, all of the data processing commences. Any pre-processing necessary within the table environment takes place first. Next, each of the layers begins executing. Once the layers complete executing, the output of each layer is stacked into the resulting data frame.

Once this process is complete, any post-processing necessary within the table environment takes place, and the final output can be delivered. Metadata and traceability information are kept within each of the layer environments, which allows an investigation into the source of the resulting datapoints. For example, numeric data from any summaries performed is maintained and accessible within a layer using get_numeric_data.

The 'metadata' option of build will trigger the construction of traceability metadata for the constructed data frame. Essentially, for every "result" that Tplyr produces, Tplyr can also generate the steps necessary to obtain the source data which produced that result from the input. For more information, see vignette("metadata").


An executed tplyr_table

See Also

tplyr_table, tplyr_layer, add_layer, add_layers, layer_constructors


# Load in Pipe

tplyr_table(iris, Species) %>%
    group_desc(Sepal.Length, by = "Sepal Length")
  ) %>%
    group_desc(Sepal.Width, by = "Sepal Width")
  ) %>%

Tplyr documentation built on Jan. 11, 2023, 1:10 a.m.