Description Usage Arguments Examples
View source: R/recode_ethnicity.R
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"
1 | recode_ethnicity(df, source = "students")
|
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). |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.