tests/testthat/test-lat-lang.R

library(lingtypology)
context("Tests for lat.lang function")

df <- data.frame(my_langs = c("Adyghe", "Russian"), stringsAsFactors = FALSE)

test_that("lat.lang", {
  skip_on_cran()
    expect_equal(lat.lang("Adyghe"), c(Adyghe = 44))
    expect_equal(lat.lang(df), c(my_langs1 = 44, my_langs2 = 59))
    expect_equal(lat.lang(c("Adyghe", "Russian")), c(Adyghe = 44, Russian = 59))
})

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.