tests/testthat/test-stats_type_switch.R

test_that(
  desc = "switch for stats type works",
  code = {
    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 statsExpressions package in your browser

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

statsExpressions documentation built on Sept. 12, 2023, 5:07 p.m.