tests/testthat/test_PlotCatVar.R

library(otvPlots)
library(proto)
context("Plot categorical variable")
load("../testthat/testData.rda")
setDT(testData)

test_that("PlotCatVar returns a gtable", {
	PrepData(testData, dateNm = "date", dateGp = "weeks", dateGpBp = "months")
	p <- PlotCatVar("marital", testData, NULL, "weeks", "months")$p	
	expect_is(p, "gtable")
})

Try the otvPlots package in your browser

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

otvPlots documentation built on May 1, 2019, 6:49 p.m.