Hi @tabumis,
I encourage you to also make use of the optional preprocess
function. The purpose of having this function, which runs before the predict
loop, is to allow you to do data processing upfront more efficiently. You can do move redundant computations or use of heavier-duty R libraries into this step, and reduce what you need to do in the predict
loop. See also this recent related thread.