code_agreements: Code Agreement Titles

View source: R/code_agreements.R

code_agreementsR Documentation

Code Agreement Titles

Description

Creates an ID that contains information on the parties to an agreement, the type of agreement, the date, and the linkage to other agreements.

Usage

code_agreements(dataset = NULL, title, date)

Arguments

dataset

A 'many' dataset. If provided without a title and date variables, the function finds title and date conforming columns in the dataset. The function "expects" that there are variables named Title and Beg that they have been standardised using standardise_titles() and messydates::as_messydate(), respectively.

title

A title variable. The function "expects" that the variable has been standardised using standardise_titles().

date

A date variable. The function "expects" that the variable has been standardised using messydates::as_messydate().

Value

a character vector with the treatyIDs

Examples

## Not run: 
IEADB <- dplyr::slice_sample(manyenviron::agreements$IEADB, n = 10)
code_agreements(dataset = IEADB)
code_agreements(title = IEADB$Title, date = IEADB$Beg)

## End(Not run)

globalgov/qCreate documentation built on April 27, 2023, 3:27 a.m.