afsc_roots: Air Force Specialty Code (AFSC) Prefixes/Suffixes

Description Usage Arguments Value Examples

Description

Extract or strip off AFSC prefixes and suffixes (if any).

Usage

1
2
3
4
5
6
7
8
9
strip_roots(x, allow_X = FALSE)

get_prefix(x, allow_X = FALSE)

get_suffix(x, allow_X = FALSE)

has_prefix(x, allow_X = FALSE)

has_suffix(x, allow_X = FALSE)

Arguments

x

A character vector containing AFSCs.

allow_X

Logical indicating whether or not the "X" placeholder is allowed. Default is FALSE.

Value

strip_roots returns the original vector of AFSCs with all of the prefixes and suffixes (if any) removed. The functions get_prefix and get_suffix return, respectively, the prefix and suffix (if any) from each AFSC.

Examples

1
2
3
4
afscs <- c("9T000", "X1N371E", "123ABC")
strip_roots(afscs)
get_prefix(afscs)
get_suffix(afscs)

bgreenwell/afsc documentation built on May 12, 2019, 8:19 p.m.