recode_ethnicity: Recode Ethnicity

Description Usage Arguments Examples

View source: R/recode_ethnicity.R

Description

This function recodes ethnicity to align with VDOE practices and replaces codes with descriptions. It assumes that the ethnicity variable is named "ethnic" and the hispanic variable is names "hispanic_latino"

Usage

1
recode_ethnicity(df, source = "students")

Arguments

df

data

source

the table the data originally comes from; must be either "students" (from the RE_Students table) or "src" (from one of the SRC tables).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
library(tidyverse)
library(janitor)
library(ccpsr)

con <- set_con()

ex <- odbc::dbGetQuery(con, 'SELECT *
FROM [CCPS_Shared].[CCPS_Shared].[RE_Students]
WHERE School_Year = 2019')

ex %>%
clean_names() %>%
recode_ethnicity()


## End(Not run)

ekholme-ccps/ccpsr documentation built on Aug. 17, 2021, 10:01 p.m.