team_functions: WCCMH team functions

Description Usage Arguments Format Value Note Examples

Description

cmh_recode recodes Washtenaw CMH team names to a standardized team format. recode_team_prog recodes Washtenaw CMH team/program names to a standardized program format. cmh_teams_f factors (ordered is an option) teams. cmh_priority_dt assigns a priority to all of the main teams.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cmh_team_key

cmh_program_key

cmh_recode(x, missing_key = "non-CMH")

recode_team_prog(x, missing_key = "non-CMH")

cmh_teams_f(x, levels = c("ACT", "DD", "MI", "Child HB", "Child"),
  level_order = NULL)

cmh_priority_dt

Arguments

x

A character vector of team names. Will be coerced to character if class(x) is factor.

missing_key

What will happen if a recode_ function is supplied a value not found in recode key. Default is 'non-CMH'. If missing_key is assigned to NULL, an error will occur if any values are in x and not in recode_key.

levels

The levels that will be assigned. Unspecified inputs result in NA.

level_order

The order of the levels. Defaults to NULL.

Format

An object of class list of length 10.

Value

recode_x functions: A vector of recoded team/program names. cmh_teams_f A factored vector. cmh_priority_dt A data.table object.

Note

need testing, consider adding an automatic "missing" assignment with a warning message.

Examples

1
2
cmh_recode("WSH - ACT")
cmh_recode(c("WSH - ACT", "DD Adult"))

JamesDalrymple/wccmh documentation built on May 7, 2019, 10:20 a.m.