tests/testthat/test-guess_bar_count.R

context("guess bar count")

test_that("guess bar count", {
  x = c(110, 100, 85, 85, rep(1, 100))
  guess = guess_bar_count(x, min_bar = 3, max_bar = 25)
  expect_equal(guess, 4L)
})

Try the rPackedBar package in your browser

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

rPackedBar documentation built on June 17, 2019, 9:02 a.m.