tests/testthat/test-country-names.R

test_that("prettyc() works", {

  xin <- c("Congo, Democratic Republic of (Zaire)",
           "Vietnam (Annam/Cochin China/Tonkin)",
           "Yemen, People's Republic of")
  xout <- c("DR Congo",
            "Vietnam",
            "South Yemen")
  expect_equal(prettyc(xin), xout)

})

Try the states package in your browser

Any scripts or data that you put into this service are public.

states documentation built on Sept. 8, 2023, 5:48 p.m.