tests/testthat/test-report.numeric.R

test_that("Median removes NA", {
  x <- c(1, 2, NA, 4)
  result <- report_table(x)$Median
  expect_identical(result, median(x, na.rm = TRUE))
})

Try the report package in your browser

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

report documentation built on Nov. 5, 2025, 7:38 p.m.