tests/testthat/test_fbind.R

test_that("fbind binds factors(or characters)",{
  a <- iris$Species[c(1, 51, 101)]
  b <- PlantGrowth$group[c(1, 11, 21)]
  res <- fbind(a,b)
  expect_identical(res,
                   factor(c(levels(iris$Species),
                            levels(PlantGrowth$group))))
})
gjahesh/foofactors documentation built on May 17, 2019, 6:02 a.m.