Skip to contents

Codes an acronym for agreement titles to facilitate identification and comparuison across datasets.

Usage

code_acronym(title)

Arguments

title

A character vector of treaty title

Details

Codes acronyms that are 4 to 6 digits long. For shorter treaty titles, six words or less, acronym includes first letter of each word. For longer treaty titles, seven words or more, acronym includes first letter of first word followed by the number of words in and title first letter of last word in title.

Examples

# \donttest{
IEADB <- dplyr::slice_sample(manyenviron::agreements$IEADB, n = 10)
code_acronym(IEADB$Title)
#>  [1] "IR07AF" "GR14TU" "US10BS" "GR10AE" "INTRRW" "CPRQPP" "EN05AC" "CE07RN"
#>  [9] "CM10RS" "GR08AE"
# }