As both the getCrudeAndAdjustedModelData()
and the
printCrudeAndAdjustedModel()
need to now exactly
what name from the coef()
/summary.rms()
correspond to we for generalizeability this rather elaborate function.
prMapVariable2Name(var_names, available_names, data, force_match = TRUE)
list
Returns a list with each element has the corresponding
variable name and a subsequent list with the parameters no_rows
and location
indiciting the number of rows corresponding to that
element and where those rows are located. For factors the list also contains
lvls
and no_lvls
.
The variable names that are saught after
The names that are available to search through
The data set that is saught after
Whether all variables need to be identified or not.
E.g. you may only want to use some variables and already pruned the
available_names
and therefore wont have matches. This is the
case when getCrudeAndAdjustedModelData()
has been used together
with the var_select
argument.