View source: R/add_minimum_distance.R
add_minimum_distance | R Documentation |
add_minimum_distance()
allows you to add the minimum
distance (in kilometers) to a (dyad-year, leader-year, leader-dyad-year, state-year) data frame. These estimates
are recorded in the cow_mindist
and gw_mindist
data that come with this package. The
data are current as of the end of 2019.
add_minimum_distance(data)
data |
a data frame with appropriate peacesciencer attributes |
The function leans on attributes of the data that are provided by one of the "create" functions
in this package (e.g. create_dyadyear()
or create_stateyear()
).
add_minimum_distance()
takes a (dyad-year, leader-year, leader-dyad-year, state-year) data frame and adds the
minimum distance between the first state and the second state (in dyad-year data) or the minimum
minimum (sic) distance for a given state in a given year.
Steven V. Miller
Schvitz, Guy, Luc Girardin, Seraina Ruegger, Nils B. Weidmann, Lars-Erik Cederman,
and Kristian Skrede Gleditsch. 2022. "Mapping The International System, 1886-2017:
The CShapes
2.0 Dataset." Journal of Conflict Resolution. 66(1): 144-161.
Weidmann, Nils B. and Kristian Skrede Gleditsch. 2010. "Mapping and Measuring Country Shapes: The cshapes
Package."
The R Journal 2(1): 18-24.
# just call `library(tidyverse)` at the top of the your script
library(magrittr)
cow_ddy %>% add_minimum_distance()
create_dyadyears(system = "gw") %>% add_minimum_distance()
create_stateyears(system ="gw") %>% add_minimum_distance()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.