tests/testthat/test-crossmerge.R

test_that("crossmerge returns the Cartesian product", {
  x <- data.frame(id = c(1, 2))
  y <- data.frame(label = c("a", "b", "c"))

  out <- crossmerge(x, y)

  expect_s3_class(out, "basetable")
  expect_equal(nrow(out), 6L)
})

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.