From cb2f2eb6a46b60951e0b211b2321c3c477c36cfd Mon Sep 17 00:00:00 2001 From: mitchelloharawild Date: Fri, 1 Nov 2024 13:48:21 +1100 Subject: [PATCH] Improve VECM xreg -> matrix flattening --- R/vecm.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/vecm.R b/R/vecm.R index 8d6f9ca0..2d56a637 100644 --- a/R/vecm.R +++ b/R/vecm.R @@ -8,7 +8,7 @@ train_vecm <- function(.data, specials, ic, ...) { # Get xreg constant <- specials$xreg[[1]]$constant - xreg <- do.call(cbind, specials$xreg[[1]]$xreg) # Convert from df to matrix + xreg <- Reduce(cbind, specials$xreg[[1]]$xreg) # Convert from df to matrix # Choose best model reduce(transpose(expand.grid(p = p, constant = constant)),