tests/testthat/test-omegaRse.R

rxTest({
  test_that("omega RSE function", {

    tmp <- cvPost(10.2, omega=lotri::lotri(a~0.1), 5)
    lst <- omegaListRse(tmp)

    expect_equal(mean(unlist(tmp)), as.vector(lst[["mean"]]))
    expect_equal(var(unlist(tmp)), as.vector(lst[["var"]]))
    expect_equal(sd(unlist(tmp)), as.vector(lst[["sd"]]))
    expect_equal(sd(unlist(tmp))/mean(unlist(tmp)), as.vector(lst[["rse"]]))

  })
})

Try the rxode2 package in your browser

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

rxode2 documentation built on Oct. 30, 2024, 9:06 a.m.