edu_group_sum: Education group sums

View source: R/edu_group_sum.R

edu_group_sumR Documentation

Education group sums

Description

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

Usage

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

library(tidyverse)
past_epop %>%
  filter(year == 2020) %>%
  edu_group_sum()

wcde documentation built on June 7, 2022, 1:11 a.m.