tests/testthat/test-data-mask.R

test_that("Empty matrix can be coerced to a data frame (#7004)", {
  skip_if_not(getRversion() >= "4.4")
  expect_equal(
    slice(as.data.frame(matrix(nrow = 0, ncol = 0)), 1),
    data.frame()
  )
})
hadley/dplyr documentation built on Nov. 6, 2024, 4:48 p.m.