Somewhere within the code, it is trying to multiply two integers but the result is greater than the maximum integer that can be stored on your machine (.Machine$integer.max
).
Without delving too much into the code, your inputs must be too big for this tool. Either work with a smaller data
, or fewer knots by increasing the by
argument to seq
. Roughly, (nrow(data)^2 / .Machine$integer.max
should give you a lower bound on how big by
should be.