Skip to contents

This function allows dynamic aggregation and validation of data read by orbi_read_raw. Like orbi_read_raw(), it is designed to be fail save by safely catching errors and reporting back on them (see orbi_get_problems()). This function should work out of the box for most files without additional modification of the aggregator.

Usage

orbi_aggregate_raw(
  files_data,
  aggregator = orbi_get_option("raw_aggregator"),
  show_progress = rlang::is_interactive(),
  show_problems = TRUE
)

Arguments

files_data

the files read in by orbi_read_raw

aggregator

an aggregator table (orbi_start_aggregator()) that defines which data should be aggregated and how. By default takes the predefined aggregator for raw data files stored in the orbi_options()

show_progress

whether to show a progress bar, by default always enabled when running interactively e.g. inside RStudio (and disabled in a notebook), turn off with show_progress = FALSE

show_problems

whether to show problems encountered along the way (rather than just keeping track of them with orbi_get_problems()). Set to show_problems = FALSE to turn off the live printout. Either way, all encountered problems can be retrieved with running orbi_get_problems() for the returned list

Value

a list of merged dataframes collected from the files_data based on the aggregator definitions