aboutsummaryrefslogtreecommitdiff
path: root/R/multistart.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-10-28 10:31:16 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-10-28 10:31:16 +0200
commit4c868d65be04c8ee3fedc89d28d0e7d8c5da05e0 (patch)
tree6aa3123f7b722bcffdbdc06c06abe867726c8b91 /R/multistart.R
parent0e9220c6b9132602a3d69e4be582a02da8b07822 (diff)
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.
Diffstat (limited to 'R/multistart.R')
-rw-r--r--R/multistart.R12
1 files changed, 6 insertions, 6 deletions
diff --git a/R/multistart.R b/R/multistart.R
index fc2dcd7d..29ccdc44 100644
--- a/R/multistart.R
+++ b/R/multistart.R
@@ -112,7 +112,7 @@ multistart.saem.mmkin <- function(object, n = 50, cores = 1,
}
#' @export
-convergence.multistart <- function(object, ...) {
+status.multistart <- function(object, ...) {
all_summary_warnings <- character()
result <- lapply(object,
@@ -124,12 +124,12 @@ convergence.multistart <- function(object, ...) {
})
result <- unlist(result)
- class(result) <- "convergence.multistart"
+ class(result) <- "status.multistart"
return(result)
}
#' @export
-convergence.multistart.saem.mmkin <- function(object, ...) {
+status.multistart.saem.mmkin <- function(object, ...) {
all_summary_warnings <- character()
result <- lapply(object,
@@ -141,12 +141,12 @@ convergence.multistart.saem.mmkin <- function(object, ...) {
})
result <- unlist(result)
- class(result) <- "convergence.multistart"
+ class(result) <- "status.multistart"
return(result)
}
#' @export
-print.convergence.multistart <- function(x, ...) {
+print.status.multistart <- function(x, ...) {
class(x) <- NULL
print(table(x, dnn = NULL))
if (any(x == "OK")) cat("OK: Fit terminated successfully\n")
@@ -157,7 +157,7 @@ print.convergence.multistart <- function(x, ...) {
#' @export
print.multistart <- function(x, ...) {
cat("<multistart> object with", length(x), "fits:\n")
- print(convergence(x))
+ print(status(x))
}
#' @rdname multistart

Contact - Imprint