tests/testthat/test-utils.stats.R

# Characterization tests for utils.stats (std.error)
# Baseline snapshotted before review (infrastructure wave, dev at ddaed27).

test_that("std.error matches the definition", {
  x <- c(1, 2, 3, NA)
  expect_equal(std.error(x), sqrt(var(x, na.rm = TRUE) / 3))
  expect_equal(std.error(c(5, 5, 5)), 0)
})

Try the dartR.base package in your browser

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

dartR.base documentation built on Nov. 18, 2026, 9:06 a.m.