Skip to contents

ps_cite() allows the user to get citations to scholarship that they should include in their papers that incorporate the functions and data in this package.

Usage

ps_cite(x, column = "keywords")

Arguments

x

a character vector

column

a character vector for the particular column of ps_bib the user wants to search. The default here is "keywords", which searches the KEYWORDS column in ps_bib for the most general search. The other option is "bibtexkey", which will search the BIBTEXKEY column in ps_bib. Use the latter option more for pairing with output from ps_version()

Value

ps_cite() takes a character vector and scans the ps_bib data in this package to return a BibTeX citation (or citations) for the researcher to use to properly cite the material they are getting from this package. The citations are returned as a full BibTeX entry (or entries) that they can copy-paste into their own BibTeX file.

Details

The base functionality here is simple pattern-matching on keywords in ps_bib. This simple pattern-matching is in base R. I assume the user has some familiarity with BibTeX.

Author

Steven V. Miller

Examples


# You can cite the package
ps_cite("peacesciencer")
#> @Manual{peacesciencer-package,
#>   Author = {Steven V. Miller},
#>   Title = {peacesciencer}: A User's Guide for Quantitative Peace Science in R},
#>   Year = {2021},
#>   Keywords = {peacesciencer, add_capital_distance(), add_ccode_to_gw(), add_gwcode_to_cow(), capitals},
#>   Url = {http://svmiller.com/peacesciencer/}
#> }

# You can do partial matching
ps_cite("democracy")
#> @Unpublished{coppedgeetal2020vdem,
#>   Author = {Michael Coppedge and John Gerring and Carl Henrik Knutsen and Staffan I. Lindberg and Jan Teorell and David Altman and Michael Bernhard and M. Steven Fish and Adam Glynn and Allen Hicken and Anna Luhrmann and Kyle L. Marquardt and Kelly McMann and Pamela Paxton and Daniel Pemstein and Brigitte Seim and Rachel Sigman and Svend-Erik Skaaning and Jeffrey Staton and Agnes Cornell and Lisa Gastaldi and Haakon Gjerl{\o}w and Valeriya Mechkova and Johannes von R{\"o}mer and Aksel Sundtr{\"o}m and Eitan Tzelgov and Luca Uberti and Yi-ting Wang and Tore Wig and Daniel Ziblatt},
#>   Note = {Varieties of Democracy ({V}-{D}em) Project},
#>   Title = {V-Dem Codebook v10},
#>   Year = {2020},
#>   Keywords = {add_democracy(), v-dem, varieties of democracy}
#> }
#> 
#> 
#> @Unpublished{marshalletal2017p,
#>   Author = {Monty G. Marshall and Ted Robert Gurr and Keith Jaggers},
#>   Note = {University of Maryland, Center for International Development and Conflict Management},
#>   Title = {Polity {IV} Project: Political Regime Characteristics and Transitions, 1800-2016},
#>   Year = {2017},
#>   Keywords = {add_democracy(), polity}
#> }
#> 
#> 
#> @Unpublished{marquez2016qme,
#>   Author = {Xavier Marquez},
#>   Note = {Available at SSRN: http://ssrn.com/abstract=2753830},
#>   Title = {A Quick Method for Extending the {U}nified {D}emocracy {S}cores},
#>   Year = {2016},
#>   Keywords = {add_democracy(), UDS, Unified Democracy Scores},
#>   Url = {http://dx.doi.org/10.2139/ssrn.2753830}
#> }
#> 
#> 
#> @Article{pemsteinetal2010dc,
#>   Author = {Pemstein, Daniel and Stephen A. Meserve and James Melton},
#>   Journal = {Political Analysis},
#>   Number = {4},
#>   Pages = {426--449},
#>   Title = {Democratic Compromise: A Latent Variable Analysis of Ten Measures of Regime Type},
#>   Volume = {18},
#>   Year = {2010},
#>   Keywords = {add_democracy(), UDS, Unified Democracy Scores},
#>   Owner = {steve},
#>   Timestamp = {2011.01.30}
#> }

# Or more partial matching
ps_cite("alliance")
#> @Article{leedsetal2002atop,
#>   Author = {Bretty Ashley Leeds and Jeffrey M. Ritter and Sara McLaughlin Mitchell and Andrew G. Long},
#>   Journal = {International Interactions},
#>   Pages = {237--260},
#>   Title = {Alliance Treaty Obligations and Provisions, 1815-1944},
#>   Volume = {28},
#>   Year = {2002},
#>   Keywords = {add_atop_alliance()}
#> }
#> 
#> 
#> @Book{gibler2009ima,
#>   Author = {Douglas M. Gibler},
#>   Publisher = {Washington DC: CQ Press},
#>   Title = {International Military Alliances, 1648-2008},
#>   Year = {2009},
#>   Keywords = {add_cow_alliance()}
#> }

# You can also get all citations for a particular function
ps_cite("add_archigos()")
#> @Article{goemansetal2009ia,
#>   Author = {Henk E. Goemans and Kristian Skrede Gleditsch and Giacomo Chiozza},
#>   Journal = {Journal of Peace Research},
#>   Number = {2},
#>   Pages = {269--83},
#>   Title = {Introducing {A}rchigos: A Dataset on Political Leaders},
#>   Volume = {46},
#>   Year = {2009},
#>   Keywords = {add_archigos()}
#> }

# If you know some of the `BibTeX` keys, you can search there as well.
ps_cite("gibler", column = "bibtexkey")
#> @Book{gibler2009ima,
#>   Author = {Douglas M. Gibler},
#>   Publisher = {Washington DC: CQ Press},
#>   Title = {International Military Alliances, 1648-2008},
#>   Year = {2009},
#>   Keywords = {add_cow_alliance()}
#> }
#> 
#> 
#> @Article{gibleretal2016amid,
#>   Author = {Douglas M. Gibler and Steven V. Miller and Erin K. Little},
#>   Journal = {International Studies Quarterly},
#>   Number = {4},
#>   Pages = {719--730},
#>   Title = {An Analysis of the {M}ilitarized {I}nterstate {D}ispute {(MID)} Dataset, 1816-2001},
#>   Volume = {60},
#>   Year = {2016},
#>   Keywords = {add_gml_mids()},
#>   Owner = {steve},
#>   Timestamp = {2016.04.20}
#> }
#> 
#> 
#> @Article{giblermiller2014etts,
#>   Author = {Gibler, Douglas M. and Steven V. Miller},
#>   Journal = {Journal of Peace Research},
#>   Number = {5},
#>   Pages = {634--646},
#>   Title = {External Territorial Threat, State Capacity, and Civil War},
#>   Volume = {51},
#>   Year = {2014},
#>   Keywords = {add_rugged_terrain()},
#>   Owner = {steve},
#>   Timestamp = {2014.09.04}
#> }