tests/testthat/test_pyramid.plot.R

library(nipnTK)
context("Tests for pyramid.plot")

svy <- dp.ex02
pyplot <- pyramid.plot(svy$age, svy$sex)

test_that("pyplot is table", {
  expect_is(pyplot, "table")
})

pyplot <- pyramid.plot(svy$age, svy$sex, col = c("red", "blue"))

test_that("pyplot is table", {
  expect_is(pyplot, "table")
})

Try the nipnTK package in your browser

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

nipnTK documentation built on June 22, 2024, 11:06 a.m.