recode_demos: Recode Demographics

Description Usage Arguments Examples

View source: R/recode_demos.R

Description

This will recode special education status, ell status, and gifted status. The function assumes that janitor::clean_names() has already been run and that the names of the demographic variables have not otherwise been changed

Usage

1
recode_demos(df, ell_source = "students")

Arguments

df

data

ell_source

the source of the ell data; either 'students' or 'ell_tbl'. If 'students', the column holding the data to be recoded is assumed to be named 'ell_status.' If 'ell_tbl,' the column holding the data to be recoded is assumed to be named 'prof_level'. Both recode the data into a variable named 'ell_status'.

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_demos()


## End(Not run)

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