R/check_input_tbl.R
check_input_tbl.Rd
check_input_tbl
is a helper function for various modeling and
scoring functions in `INDperform`. It checks whether the input object
is of class tibble (should be if an output of one of the required functions)
and if all required variables are included in the tibble with the correct
data type. If not, an error message will be returned.
check_input_tbl( x, tbl_name, parent_func = NULL, var_to_check = NULL, dt_to_check = NULL )
x | An output tibble from one of the INDperform modeling or scoring functions. |
---|---|
tbl_name | The name of `x` for the error message. |
parent_func | The name of the function that generates the output tibble `x`. |
var_to_check | A character vector listing the variables to check for in `x`. |
dt_to_check | A character vector listing the data types of each variable listed in var_to_check (has to be the same order!) to check for. |
The function returns the checked input tibble unchanged.