tests/testthat/test-fbind.R

test_that("bbind actually binds factors", {
  # This tests that fbind() gives an expected result when
  # combining two factors and a character vector and a factor.

  x <- c("a", "b")
  x_fact <- factor(x)
  y <- c("c", "d")
  z <- factor(c("a", "b", "c", "d"))

  expect_identical(fbind(x, y), z)
  expect_identical(fbind(x_fact, y), z)
})
nicholas-camarda/telemetRy documentation built on Dec. 22, 2021, 2:11 a.m.