Skip to contents

Identify the countries that are part of an agreement.

Usage

code_parties(title, activity = TRUE)

Arguments

title

A character vector of treaty titles

activity

Do you want the activity of treaty to be coded? By default, TRUE.

Value

A character vector of parties that are mentioned in the treaty title

Details

The function codes states in treaties alongside, returning only parties for bileteral treaties (i.e. 2 parties coded). The function also returns the "activity" for bilateral treaties coded, if activity is TRUE. Bilateral agreements usully detail their activity and specify area in the last words of the titles. These last words are abbreviated by the function to differentiate between bilateral treaties and avoid false positives being generated since multiple, different, bileteral treaties are often signed in the same day. For the complete list of parties coded please run the function without an argument (i.e. code_parties()).

Examples

# \donttest{
IEADB <- dplyr::slice_sample(manyenviron::agreements$IEADB, n = 10)
code_parties(IEADB$Title)
#>  [1] "FIN-SWE[BSA]" NA             NA             "CHN-THA[SRN]" NA            
#>  [6] NA             "CAN-CHN[PNE]" "MYS-NZL[ENV]" NA             NA            
# }