tests/testthat/test-format.R

test_that("format_order", {
  expect_identical(format_order(2), "second")
  expect_identical(format_order(45), "forty fifth")
  expect_identical(format_order(2, textual = FALSE), "2nd")
  expect_identical(format_order(45, textual = FALSE), "45th")
})

Try the parameters package in your browser

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

parameters documentation built on Nov. 2, 2023, 6:13 p.m.