edu_group_sum: Education Group Sums

Description Usage Arguments Details Value Examples

View source: R/edu_group_sum.R

Description

Cleans epop data, downloaded using the wcde() function, for summations of population by 4, 6 or 8 education groups.

Usage

1
edu_group_sum(d = NULL, n = 4, strip_totals = TRUE, factor_convert = TRUE)

Arguments

d

Data frame downloaded from the

n

Number of education groups (from 4, 6 or 8)

strip_totals

Remove total sums in epop column. Will not strip education totals if year < 2015 and n = 8 as past data on population size by 8 education groups is unavailable.

factor_convert

Convert columns that are character strings to factors, with levels based on order of appearance.

Details

Strips the epop data set to relevant rows for the n education groups.

Value

A tibble with the data selected.

Examples

1
2
3
4
5
library(tidyverse)
past_epop %>%
  filter(year == 2020) %>%
  mutate(scenario = 2) %>%
  edu_group_sum()

wcde documentation built on July 28, 2021, 9:06 a.m.