check_parameter: Belonging to a given range of values

Description Usage Arguments Details Value Note Author(s) Examples

Description

The function checks if a parameter of class "numeric" belongs to a given range of values. Only suitable for closed intervals, i.e. [a,b].

Usage

1
check_parameter(parameter, vmin, vmax)

Arguments

parameter

Object of class "numeric", the object of which is tested the belonging to the interval.

vmin

Object of class "numeric", the minimum value of the interval.

vmax

Object of class "numeric", the maximum value of the interval.

Details

This function doesn't return anything, it only gives an error (entering debug mode) if the parameter is outside the specified range.

Value

This function returns nothing. It only gives an error message if the parameter it's outside the specified range.

Note

Observations and bug segnalations are welcome.

Author(s)

Eugenio Thieme, eugen@thieme.it

Examples

1
2
3
4
alpha <- 0.05 
# A parameter to check, for example the threshold for the pvalue 
# (like the other probabilities, must be in [0,1])
check_parameter(alpha, vmin=0, vmax=1)

theugen/moving_window documentation built on May 31, 2019, 9:51 a.m.