tests/testthat/test-format.r

ord <- prcomp(iris[, 1:4])

# adapted from tibble tests
test_that("`print()` returns object invisibly", {
  expect_output(ret <- withVisible(print(as_tbl_ord(ord))))
  expect_false(ret$visible)
  expect_identical(ret$value, as_tbl_ord(ord))
})

Try the ordr package in your browser

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

ordr documentation built on Oct. 21, 2022, 1:07 a.m.