View source: R/code_agreements.R
code_states | R Documentation |
Identify the countries that are part of an agreement.
code_states(title, activity = TRUE, replace = NULL)
title |
A character vector of treaty titles |
activity |
Do you want the activity of treaty to be coded? By default, TRUE. |
replace |
Do you want the state name or abbreviation to be returned? By default, NULL. Other options include, "names", for the state name, or "ID", for the 3 letter state abbreviation. |
The function codes states in treaty titles.
The function also returns the "activity" for bilateral treaties coded,
if activity is TRUE.
Bilateral agreements usually 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, bilateral 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_states()
).
A character vector of parties that are mentioned in the treaty title
## Not run:
IEADB <- dplyr::slice_sample(manyenviron::agreements$IEADB, n = 10)
code_states(IEADB$Title)
code_states(IEADB$Title, activity = FALSE)
code_states(IEADB$Title, activity = FALSE, replace = "names")
code_states(IEADB$Title, activity = FALSE, replace = "ID")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.