aggr_and_merge: Creates country level variables by aggregating individual...

aggr_and_mergeR Documentation

Creates country level variables by aggregating individual level variables

Description

Creates country level variables by aggregating individual level variables

Usage

aggr_and_merge(
  variables,
  group,
  data,
  FUN = "mean",
  prefix = paste0(group, ".")
)

Arguments

variables

Variable to be aggregated.

group

Grouping variable.

data

A dataset with individual-level data.

FUN

Aggregation function, mean by default.

prefix

Character string, what should be added to the names of aggregated variables.


MaksimRudnev/LittleHelpers documentation built on June 10, 2025, 12:58 p.m.