diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2023-11-26 20:38:30 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2023-11-26 20:38:30 +0100 |
commit | b07f9fcb7468ac1b5fab0924328fba36ae943be5 (patch) | |
tree | 225480f5001235a9c19f2ff9d820aa67796e8c88 /R/status.R | |
parent | a08726719217135455e571e00e4eb165712d6221 (diff) |
Deal with 'saem' fits failing when updating an 'mhmkin' object
Diffstat (limited to 'R/status.R')
-rw-r--r-- | R/status.R | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -74,15 +74,19 @@ print.status.mmkin <- function(x, ...) { status.mhmkin <- function(object, ...) { if (inherits(object[[1]], "saem.mmkin")) { test_func <- function(fit) { - if (inherits(fit$so, "try-error")) { - return("E") + if (inherits(fit, "try-error")) { + return("E") } else { - if (!is.null(fit$FIM_failed)) { - return_values <- c("fixed effects" = "Fth", - "random effects and error model parameters" = "FO") - return(paste(return_values[fit$FIM_failed], collapse = ", ")) + if (inherits(fit$so, "try-error")) { + return("E") } else { - return("OK") + if (!is.null(fit$FIM_failed)) { + return_values <- c("fixed effects" = "Fth", + "random effects and error model parameters" = "FO") + return(paste(return_values[fit$FIM_failed], collapse = ", ")) + } else { + return("OK") + } } } } |