aggr_by_freq: Aggregate Data by Frequency

View source: R/access_db.R

aggr_by_freqR Documentation

Aggregate Data by Frequency

Description

Aggregates data from a wide-format data frame according to a specified frequency and applies aggregation and post-processing functions.

Usage

aggr_by_freq(
  table,
  freq,
  prep_fun,
  aggr_funs,
  postp_funs,
  variable_name,
  preprocess_body
)

Arguments

table

[mandatory] (data.frame) A wide-format data frame.

freq

[mandatory] (character) Specifies the frequency to aggregate the data.

prep_fun

[mandatory] (function) Function used for pre-processing.

aggr_funs

[mandatory] (function or list) Aggregation function(s).

postp_funs

[mandatory] (function or list) Post-processing function(s).

variable_name

[mandatory] (character) Name of the current variable.

preprocess_body

[mandatory] (character) Body of the prep_fun function.

Value

A data frame in wide format with aggregated values.


geeLite documentation built on Aug. 9, 2025, 1:08 a.m.