tests/testthat/test-mean_absorption.R

test_that("function works", {
  expect_equal(mean_absorption(c(48e5,28e9), 500, c(4, 94)), matrix(c(3216.7275)))
})


test_that("function does not work", {
  expect_error(mean_absorption(c(48e5,28e9), "head", c(4, 94)), "non-numeric argument to binary operator")
})

Try the tagtools package in your browser

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

tagtools documentation built on Dec. 19, 2025, 1:06 a.m.