inst/tinytest/test_Formula.R

library(reformulas)
if (requireNamespace("Formula")) {
  form <- lwage ~ ns(exp, df = 3) | blk
  attr(form, "lhs") <- quote(lwage)
  attr(form, "rhs") <- list(quote(ns(exp, df = 3)), quote(blk))
  form <- Formula::as.Formula(form)
  expect_null(findbars_x(form, target = "||", default.special = NULL))
}

Try the reformulas package in your browser

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

reformulas documentation built on Feb. 2, 2026, 9:06 a.m.