From 2bebe138aaf4600338387f4a73d265585bf349c8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 15 Mar 2024 12:01:02 +0100 Subject: [PATCH] Draft plotting simulated residuals --- R/data_plot.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/data_plot.R b/R/data_plot.R index c88c21d5a..d7ce90069 100644 --- a/R/data_plot.R +++ b/R/data_plot.R @@ -148,6 +148,11 @@ add_plot_attributes <- function(x) { obj_name <- attr(x, "object_name", exact = TRUE) dat <- NULL + # for simulated residuals, we save all necessary information in the object + if (inherits(x, "performance_simres")) { + return(x$fittedModel) + } + if (!is.null(obj_name)) { # first try, parent frame dat <- tryCatch(get(obj_name, envir = parent.frame()), error = function(e) NULL)