Skip to content

CRAN version 0.3.0

Compare
Choose a tag to compare
@andybega andybega released this 11 Dec 10:12
· 12 commits to master since this release

states 0.3.0

  • Although the original COW state list does not distinguish micro-states, like the G&W list does, the cowstates data now has a microstates coding derived from the G&W coding (#24). This makes it easier, for example, to filter out micro-states from a state panel dataset.
  • In the gwstates and cowstates data, the "iso3c" columns have been renamed to "gwn" and "cown", as they are not in fact ISO 3-character country abbreviations (#19).
  • plot_missing()'s "space" argument has been renamed "ccode".
  • id_date_sequence() now works with integer years, there is no need to convert them to Date class anymore (#20).

Improved support for state_panel shortcuts

state_panel() has further improved support for input shortcuts (#3):

  • Accepted formats for the "start" and "end" arguments now include 2006, "2006", "2000-06", and "2006-06-01". See parse_date() for details.
  • The implied time period is now also inferred from shortcut input when "by" is left at the new default of NULL.
  • The "partial" option has gained new "first" and "last" values that also support shortcut input. Previously a shortcut input like 2006 could only be used with the "any" partial option, and to get country-years for states that were independent on the first day of a year one had to use state_panel("YYYY-01-01", partial = "exact", ...). This can now instead be done with state_panel(2006, partial = "first", ...).

New functions

  • Added country_names() to translate country codes to country names and prettyc() to shorten some of the longer country names, like "Macedonia, the former Yugoslav Republic of".
  • Updated vignette on G&W and COW differences to take into account when trying to translate between codes.
  • Added compare() helper to compare two statelist data frames prior to merging.
  • Added parse_date() to handle more flexible "start" and "end" date input (#12).

Bug fixes

  • all.equal() in R 4.1.x (R-devel at this point) will check environments for equivalence as well. This breaks one test since 2e testthat relies on all.equal() for expect_equal(). (#26)
  • fixed a misspelled country name, "Rumania" to "Romania"