average_groups: Group Averages

View source: R/average.R

average_groupsR Documentation

Group Averages

Description

Group Averages

Usage

average_groups(
  res,
  data = NULL,
  group,
  by = NULL,
  over = NULL,
  est = NULL,
  svy = NULL,
  user_na = FALSE,
  ...
)

Arguments

res

(dataframe) df of results with b. and se. to average

data

(dataframe) df from which to get replicated weights

group

(grp function) that takes arguments group.name, column, cases to create averages at the end of dataframe

by

(string vector) column in which we'll break down results

over

(vector string) columns over which to do analysis

est

(est function) that takes arguments what = estimate, tgt = target, rgr = regressor

svy

(string) name of possible projects to analyse TALISSCH and TALISTCH

user_na

(bool) TRUE: show nature of user defined missing values for by.var

...

Additional arguments such as na_to_zero : (Bool) TRUE → will take NA as zero for the simple average calculation

Value

Dataframe with avergas or weighted averages (totals) in last rows for the selected cases


Rrepest documentation built on April 4, 2025, 2:07 a.m.