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 Nov. 5, 2024, 10:16 p.m.