gdm.varImp sensitive to predictor names
JulFrey opened this issue · comments
Julian Frey commented
Due to line 569 in the file gdm.variable.importance.R:
grepper <- grep(var, names(permVarDev))
the function gdm.varImp failes if the varible names are character subssets of each other. For example for varibles "var1" and "var10" grep returns both while searching for the first one. The function failes afterwards while trying:
varDevTab <- permVarDev[[grepper]]
with the error message: "Error in permVarDev[[grepper]] : recursive indexing failed at level 2"
I would suggest using:
grepper <- which(var == names(permVarDev))
at line 569 to search for an exact match.
Fitzpatrick Lab commented
Thanks, issue should be resolved in latest version on github (1.5.0-4).