aboutsummaryrefslogtreecommitdiff
path: root/R/illparms.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-09-29 08:29:35 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-09-29 08:29:35 +0200
commit9fd2aaf94d15f5b11dc28f469909496a361fad71 (patch)
treecdfa832a02ba40678e135f91ad37a49d318b7b48 /R/illparms.R
parent05df90d8328b804ad1efe92c81e9ace491b386ec (diff)
Adapt to new format of failed saem.mmkin fits
Diffstat (limited to 'R/illparms.R')
-rw-r--r--R/illparms.R5
1 files changed, 4 insertions, 1 deletions
diff --git a/R/illparms.R b/R/illparms.R
index e4b28c56..c2f0263b 100644
--- a/R/illparms.R
+++ b/R/illparms.R
@@ -101,9 +101,12 @@ illparms.saem.mmkin <- function(object, conf.level = 0.95, random = TRUE, errmod
#' @rdname illparms
#' @export
illparms.mhmkin <- function(object, conf.level = 0.95, random = TRUE, errmod = TRUE, ...) {
+ if (inherits(object[[1]], "saem.mmkin")) {
+ check_failed <- function(x) if (inherits(x$so, "try-error")) TRUE else FALSE
+ }
result <- lapply(object,
function(fit) {
- if (inherits(fit, "try-error")) return("E")
+ if (check_failed(fit)) return("E")
ill <- illparms(fit, conf.level = conf.level, random = random, errmod = errmod)
if (length(ill) > 0) {
return(paste(ill, collapse = ", "))

Contact - Imprint