inst/tinytest/test_gh_issue_128.R

expect_silent(
  add_indicators(women
      , confront(women, indicator(mn=mean(height) )))
)

ii <- indicator(ratio=height/weight, mnw =mean(weight), mht = mean(height))
out <- confront(women, ii)
d <- add_indicators(women, out)
expect_equal(d$mnw, rep(mean(women$weight), nrow(women)) )
expect_equal(d$mht, rep(mean(women$height), nrow(women)) )

Try the validate package in your browser

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

validate documentation built on March 31, 2023, 6:27 p.m.