std_sc_first: Standardize contest with first letter after code

View source: R/format_values.R

std_sc_firstR Documentation

Standardize contest with first letter after code

Description

Standardize contest with first letter after code

Usage

std_sc_first(vec, use, code_regex, code_replace)

Arguments

vec

a character vector that contains some values to be used in code

use

a logical vector of the same length as vec that is TRUE when the index is to be transformed, and FALSE otherwise

raw <- c("CSB West Ashley", "CSB East Cooper", "County Council") use <- c(TRUE, TRUE, FALSE) std_sc_first(raw, use, "CSB ", "SCH")


kuriwaki/ballot documentation built on May 1, 2023, 9:55 p.m.