powered by
Internal-use function for quality checking individual parameters
check.param( param = NULL, type = c("req", "num", "unit", "uniti", "unitii", "pos", "int", "bool", "vals", "min", "mini", "vec", "mat", "sum1", "sum0"), valslist = NULL, min = NULL )
If the check passes, returns nothing. If the check does not pass, throw an error.
The parameter being checked.
The expected type of parameter: one of "req", "num", "unit(i)(i)", "pos", "int", "bool", "vals", "min(i)", "vec", "mat", "sum".
If the type is "vals", a list of allowed values.
If the type is "min" or "mini", a lower bound.
power <- 0.8 check.param(power, "unit")
Run the code above in your browser using DataLab