tests/test_list2DF.R

source("helper/helper.R")

if (exists("list2DF", envir = baseenv())) {
  f = get("list2DF", envir = baseenv())
  expect_same = makeCompareFun(f, backports:::list2DF)

  x <- list(c("A", "B"), c("B", "C"))
  n <- lengths(x)
  expect_same(list(x = x, n = n))

  ## Create data frames with no variables and the desired number of rows:
  expect_same()
  expect_same(nrow = 3L)
}

Try the backports package in your browser

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

backports documentation built on June 24, 2024, 5:24 p.m.