tests/testthat/test-fbind.R

context("test-fbind")


test_that("fbind() binds factor (or character)", {
    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)
})
FreekManders/Freekfoofactors documentation built on April 7, 2020, 12:47 a.m.