From 7068d77abfcac059d82ef7d706f5d07dc8ef73d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul-Christian=20B=C3=BCrkner?= Date: Tue, 30 Apr 2024 08:28:32 +0200 Subject: [PATCH] try to fix issue #1650 --- R/backends.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/backends.R b/R/backends.R index 97eafbc5a..b5d6bd359 100644 --- a/R/backends.R +++ b/R/backends.R @@ -799,6 +799,9 @@ read_csv_as_stanfit <- function(files, variables = NULL, sampler_diagnostics = N diagnostics <- as.data.frame(matrix(nrow = nrow(samples), ncol = 0)) } + # some diagnostics may be missing in the output depending on the algorithm + rstan_diagn_order <- intersect(rstan_diagn_order, names(diagnostics)) + # convert to regular data.frame samples <- as.data.frame(samples) chain_ids <- samples$.chain