tests/testthat/test-pull.R

test_that("pull", {
  expect_equal(
    mtcars %>% pull_dt(2),
    mtcars[,2]
  )

  expect_equal(
    mtcars %>% pull_dt(cyl),
    mtcars[["cyl"]]
  )

  expect_equal(
    mtcars %>% pull_dt(cyl),
    mtcars %>% pull_dt("cyl")
  )
})
hope-data-science/tidyfst documentation built on Sept. 23, 2024, 8:05 p.m.