Skip to contents

ps_version() allows the user to see version information about data included in peacesciencer.

Usage

ps_version(cat)

Arguments

cat

a category of data type the user wants, as a character

Value

ps_version() takes a character vector and scans the ps_data_version data in this package to return information about the particular data versions included in peacesciencer as well as a suggested citation key for scanning ps_cite(). If no category is specified for searching, it just returns all version information for all data included in functions in this package.

Details

The base functionality here is simple pattern-matching on keywords in ps_data_version. This simple pattern-matching is in base R. I assume the user has some familiarity with the types of data included in this package.

The searching is done by category included in the ps_data_version data. Users may want to just minimally run ps_version() with no argument specified to see for themselves what's in it. Typing unique(ps_data_version$category) may also get them started.

The user can consider this a companion function to ps_cite(). Whereas ps_cite() will return the appropriate citation to use in the bibliography, it may not tell them the version number at all. For example, the classic and suggested citations for the Correlates of War National Material Capabilities data are too Singer et al. (1972) and Singer (1987), though the data included in this package are about 30 years older than the most recent citation of the two.

The information communicated here can/should be included alongside a parenthetical citation. For example, the contiguity data are quite a bit more current than the suggested citation to Stinnett et al. (2002). Thus, a user may want to cite the data in their paper as something like (Stinnett et al. 2002, v. 3.2).

Author

Steven V. Miller

Examples


# What can you search for...
unique(ps_data_version$category)
#>  [1] "states"              "leaders"             "alliance"           
#>  [4] "democracy"           "capitals"            "contiguity"         
#>  [7] "igo"                 "majors"              "conflict_interstate"
#> [10] "distance"            "capabilities"        "gdp"                
#> [13] "sdp"                 "population"          "trade"              
#> [16] "conflict_intrastate" "fractionalization"   "polarization"       
#> [19] "terrain"             "rivalries"           "dyadic_similarity"  

# will show the data versions for everything
ps_version()
#> # A tibble: 32 × 4
#>    category   data                                      version bibtexkey       
#>    <chr>      <chr>                                     <chr>   <chr>           
#>  1 states     Correlates of War State System Membership 2016    cowstates2016   
#>  2 leaders    LEAD                                      2015    ellisetal2015le…
#>  3 leaders    Archigos                                  4.1     goemansetal2009…
#>  4 alliance   ATOP                                      5       leedsetal2002at…
#>  5 alliance   Correlates of War Formal Alliances        4.1     gibler2009ima   
#>  6 democracy  Polity                                    2017    marshalletal201…
#>  7 democracy  {QuickUDS}                                0.2.3   marquez2016qme  
#>  8 democracy  V-Dem                                     10      coppedgeetal202…
#>  9 capitals   {peacesciencer}                           2020    peacesciencer-p…
#> 10 contiguity Correlates of War Direct Contiguity       3.2     stinnettetal200…
#> # ℹ 22 more rows

# will show data versions for particular categories of data
ps_version("democracy")
#> # A tibble: 3 × 4
#>   category  data       version bibtexkey           
#>   <chr>     <chr>      <chr>   <chr>               
#> 1 democracy Polity     2017    marshalletal2017p   
#> 2 democracy {QuickUDS} 0.2.3   marquez2016qme      
#> 3 democracy V-Dem      10      coppedgeetal2020vdem

ps_version("leaders")
#> # A tibble: 3 × 4
#>   category data                            version bibtexkey         
#>   <chr>    <chr>                           <chr>   <chr>             
#> 1 leaders  LEAD                            2015    ellisetal2015lead 
#> 2 leaders  Archigos                        4.1     goemansetal2009ia 
#> 3 leaders  Leader Willingness to Use Force 2020    cartersmith2020fml