tests/testthat/test-get_fixed_obesity.R

test_that("expected results", {
  x <- data.frame(weight            = c("Normal", "Obese"),
                  weight_median_css = c(0, 1))
  y <- data.frame(weight            = c("Obese", "Normal"),
                  weight_median_css = c(3, 2))
  simulated_css <- list("chem1" = x, "chem2" = y)
  
  expect_equal(
    get_fixed_obesity(simulated_css, c("Normal", "Obese")),
    list(matrix(0:3,
                ncol = 2,
                dimnames = list(NULL, c("chem1", "chem2"))))
  )
})

Try the GeoTox package in your browser

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

GeoTox documentation built on April 4, 2025, 5:07 a.m.