is_abbrev {campfin} | R Documentation |
Check if abbreviation
Description
To return a value of TRUE
, (1) the first letter of abb
must match the
first letter of full
, (2) all letters of abb
must exist in full
, and
(3) those letters of abb
must be in the same order as they appear in
full
.
Usage
is_abbrev(abb, full)
Arguments
abb |
A suspected abbreviation |
full |
A long form string to test against |
Value
logical; whether abb
is potential abbreviation of full
Examples
is_abbrev(abb = "BRX", full = "BRONX")
is_abbrev(abb = state.abb, full = state.name)
is_abbrev(abb = "NOLA", full = "New Orleans")
is_abbrev(abb = "FE", full = "Iron")
[Package campfin version 1.0.11 Index]