tests/testthat/test-ncols.R

test_that("ncols returns the number of columns", {
  expect_equal(ncols(iris), 5L)
  expect_equal(ncols(data.frame(a = 1:3, b = 4:6)), 2L)
})

Try the basetable package in your browser

Any scripts or data that you put into this service are public.

basetable documentation built on Sept. 18, 2026, 9:13 a.m.