tests/testthat/test-print.R

test_that("Generic print method does not throw an error", {
  data <- men8385[1:300, ]
  weights <- men8385$weights[1:300]

  rifreg_object <- rifreg(
    formula = log(wage) ~ union + age,
    data = data,
    statistic = "quantiles",
    custom_rif_function = NULL,
    probs = 0.5,
    weights = weights,
    bootstrap = FALSE,
    bootstrap_iterations = 100,
    cores = 1
  )

  expect_error(capture.output(print(rifreg_object)), NA)
})

Try the rifreg package in your browser

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

rifreg documentation built on June 21, 2025, 5:08 p.m.