tests/testthat/test-stats_type_switch.R

# switch for stats type works ------------------------------------------

test_that(
  desc = "switch for stats type works",
  code = {
    skip_if(getRversion() < "3.6")

    expect_identical(stats_type_switch("p"), "parametric")
    expect_identical(stats_type_switch("pearson"), "parametric")
    expect_identical(stats_type_switch("non-parametric"), "nonparametric")
    expect_identical(stats_type_switch("np"), "nonparametric")
    expect_identical(stats_type_switch("r"), "robust")
    expect_identical(stats_type_switch("bf"), "bayes")
    expect_identical(stats_type_switch("xxx"), "parametric")
  }
)

Try the ipmisc package in your browser

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

ipmisc documentation built on May 7, 2021, 9:07 a.m.