tests/test-scales.R

library(vpc)
library(testit)
Sys.setenv("R_TESTS" = "")

tmp <- simple_data
sex <- (tmp$obs$ID) %% 2
race <- (tmp$obs$ID) %% 3
tmp$obs$sex <- sex
tmp$obs$race <- race
tmp$sim$sex <- sex
tmp$sim$race <- race

v1 <- vpc(sim = tmp$sim, obs = tmp$obs, stratify = "race",
          facet = "wrap", scales = "free_y", vpcdb = F, labeller = ggplot2::label_both)
assert("plot succeeded", "ggplot" %in% class(v1))
assert("facets succeeded", vpc:::is_equal(length(v1$facet$params$facets), 1))

Try the vpc package in your browser

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

vpc documentation built on Jan. 16, 2021, 5:44 p.m.