tests/testthat/test-hist.R

dat <- subset(apadbwq, select = 'do_mgl')

test_that("hist.swmpr plots histogram for single parameter", {
  expect_silent(hist(dat))
})

test_that("hist.swmpr raises an error for multiple parameters", {
  expect_error(hist(apadbwq), "Only one parameter can be plotted, use subset first")
})

Try the SWMPr package in your browser

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

SWMPr documentation built on July 26, 2023, 5:20 p.m.