Description Usage Arguments Details Value Author(s)
ParamCheck
evaluates input parameters inherited from the parent.frame; to check for names, values, and validity and ensure that a risk calculation can be carried out.
The call is stopped completely when required arguments are not stated or when compulsary inputs are invalid.
Invalid values may still be calculated an NA
returned with an error message indicating one or more problematic variables.
1 | ParamCheck(input, vars, call, is.table, allow.age, allow.na)
|
input |
list of all input values inherited from the function call |
vars |
character vector of required parameters |
call |
name of the function being called |
is.table |
logical; whether a dataset is provided in the parent.frame |
allow.age |
logical. Whether or not age range is extended outside of 30 - 74; default is TRUE. If set to FALSE, then |
allow.na |
logical. Whether or not missing values for binary variables and smoking status are treated as 0; default is TRUE. If set to FALSE, then |
ParamCheck
identifies the following errors and invalid inputs:
missing arguments - operations stops
missing input data - operation stops
invalid sex, age, ethnicity, nzdep, smoking inputs
invalid binary inputs
invalid numeric inputs
invalid level inputs
ParamCheck
returns warning messages if any invalid values are detected. In cases where input data is invalid, ParamCheck
will
stop the function's operation and return an error message.
Billy Wu (R Developer)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.