Created attachment 1840 [details]
Occasionally when using predict.Arima with a newxreg, I get warnings of the form:
Error in cbind(intercept = rep(1, n), xreg) :
(converted from warning) number of rows of result is not a multiple of vector length (arg 2)
Please see attached for a reproducible example. If one browses within the cbind call, the second argument is actually a list at that point, due to
class(xreg) <- NULL
which seems like a bug. On the other hand, the text of the warning from cbind is suggestive that there might be more going on related to lazy evaluation and/or method dispatch.
To clarify: I'm aware that passing a data.frame for xreg to arima is not an officially supported/documented usage; what made this interesting (to me) was that the warning from cbind seems to be a red herring (usually, cbind(<vector>, <list>) would result in another list).