tests/egf_enum.R

attach(asNamespace("epigrowthfit"))
library(tools)
options(warn = 2L, error = if (interactive()) recover)


## egf_enum ############################################################

ii <- Map(function(enum, type) egf_enum(c(enum, "invalid enum"), type),
          enum = c("exponential", "pois", "norm"),
          type = c("curve", "family", "prior"))

for (i in ii)
	stopifnot(exprs = {
		is.integer(i)
		length(i) == 2L
		i[1L] >=  0L
		i[2L] == -1L
	})
assertError(egf_enum(c("foo", "bar"), "invalid type"))

Try the epigrowthfit package in your browser

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

epigrowthfit documentation built on April 3, 2025, 10:51 p.m.