From 2a5a7f8516cbd22bd498aa5d61708092aefb9ee4 Mon Sep 17 00:00:00 2001 From: Janis Jatnieks Date: Mon, 2 Jul 2018 15:01:17 +0200 Subject: [PATCH] Update Surr_Train.R to fix an incorrect length of Residuals columns being exported. The problem was caused by NAs being filled in a wrong lentgh using nrow(Fout) instead of validation dataset length as it should have been using nrow(SRes). --- R/Surr_Train.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/Surr_Train.R b/R/Surr_Train.R index a10d1c9..5a67852 100644 --- a/R/Surr_Train.R +++ b/R/Surr_Train.R @@ -1264,7 +1264,7 @@ write_evals <- function( hist_bins = 25, write_errors=TRUE, Surrogate_performanc ## class(model_list[[1]]) } else if (write_errors) { - Residuals <<- c( Residuals, list( rep(NA, nrow(Fout) ) )) ## list encapsulates it into nested level + Residuals <<- c( Residuals, list( rep(NA, nrow(SRes) ) )) ## list encapsulates it into nested level } }) } -- GitLab