tests/testthat/test-function-toFactor.R

test_that("toFactor() works", {
  
  x <- c("b", "c", "a")
  
  y <- toFactor(x)
  
  expect_identical(levels(y), x)
  
  expect_identical(toFactor(y), y)
})
KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.