tests/testthat/test-aff-lang.R

df <- data.frame(my_langs = c("Korean", "Polish"), stringsAsFactors = FALSE)

test_that("aff.lang", {
  skip_on_cran()
    expect_equal(aff.lang("Korean"), c(Korean = "Koreanic"))
    expect_equal(aff.lang(c("Korean", "Polish")), c(Korean = "Koreanic", Polish = "Indo-European, Classical Indo-European, Balto-Slavic, Slavic, West Slavic, Lechitic, Polish-Silesian"))
    expect_equal(aff.lang(df), c(my_langs1 = "Koreanic", my_langs2 = "Indo-European, Classical Indo-European, Balto-Slavic, Slavic, West Slavic, Lechitic, Polish-Silesian"))
})

Try the lingtypology package in your browser

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

lingtypology documentation built on Aug. 23, 2023, 5:09 p.m.