From 4c868d65be04c8ee3fedc89d28d0e7d8c5da05e0 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 28 Oct 2022 10:31:16 +0200 Subject: Rename 'convergence' method to 'status' The reason is that it is misleading in the case of saem.mmkin objects, because convergence is not really checked there. --- R/mhmkin.R | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'R/mhmkin.R') diff --git a/R/mhmkin.R b/R/mhmkin.R index 542bddf7..47b84b9d 100644 --- a/R/mhmkin.R +++ b/R/mhmkin.R @@ -133,11 +133,10 @@ mhmkin.list <- function(objects, backend = "saemix", print.mhmkin <- function(x, ...) { cat(" object\n") cat("Status of individual fits:\n\n") - print(convergence(x)) + print(status(x)) } -#' @export -convergence.mhmkin <- function(object, ...) { +status.mhmkin <- function(object, ...) { if (inherits(object[[1]], "saem.mmkin")) { test_func <- function(fit) { if (inherits(fit$so, "try-error")) { @@ -160,12 +159,12 @@ convergence.mhmkin <- function(object, ...) { dim(result) <- dim(object) dimnames(result) <- dimnames(object) - class(result) <- "convergence.mhmkin" + class(result) <- "status.mhmkin" return(result) } #' @export -print.convergence.mhmkin <- function(x, ...) { +print.status.mhmkin <- function(x, ...) { class(x) <- NULL print(x, quote = FALSE) cat("\n") -- cgit v1.2.1