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()
  )
})
tidyverse/dplyr documentation built on Nov. 4, 2024, 2:44 a.m.