my own function given to lapply
treshold <- function(pred) {
^^^^^^^^
Error in match.fun(FUN) : Object "threshold" not found
^^^^^^^^^ If this is a direct cut & paste, you have a typo as you've defined the function as "treshold".
treshold <- function(pred) {
^^^^^^^^
Error in match.fun(FUN) : Object "threshold" not found
^^^^^^^^^ If this is a direct cut & paste, you have a typo as you've defined the function as "treshold".