tests/testthat/test_set.col.type.R

###
test_that("Insert one column in data.frame by name", {
  out <- set.col.type(mtcars, col.type = list("character" = c("cyl")))
  expect_true(is.character(out$cyl))
  expect_equal(out$cyl, as.character(mtcars$cyl))
})
weirichs/eatTools documentation built on April 3, 2024, 6:11 p.m.