tests/testthat/test-ungroup_data.R

testthat::test_that("ungroup_data", {
  x <- saros.base::ex_survey |>
    dplyr::group_by(.data$f_uni)
  testthat::expect_false(inherits(saros.base:::ungroup_data(x), "grouped_df"))
  x <- saros.base::ex_survey |>
    srvyr::as_survey_design() |>
    srvyr::group_by(.data$f_uni)
  testthat::expect_false(inherits(saros.base:::ungroup_data(x), "grouped_svy"))
})

Try the saros.base package in your browser

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

saros.base documentation built on June 8, 2025, 10:03 a.m.