aboutsummaryrefslogtreecommitdiff
path: root/R/mkinfit.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-02-20 10:23:03 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2015-02-20 10:23:03 +0100
commitbac02db46d5e332f3663f0b137c6bc4da7c73d8d (patch)
tree174a76640dcf8dc354819bd09dcec39dec97dd50 /R/mkinfit.R
parentab654b1124281f3308fcf152da93da57e0d2b83e (diff)
Fix printing the summary if iterations are not available
This was broken for using method.modFit = "SANN"
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r--R/mkinfit.R5
1 files changed, 4 insertions, 1 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 7a465c2b..08622f9c 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -388,6 +388,9 @@ mkinfit <- function(mkinmod, observed,
}
}
+ # Return number of iterations for SANN method
+ if (method.modFit == "SANN") fit$iter = maxit.modFit
+
# We need to return some more data for summary and plotting
fit$solution_type <- solution_type
fit$transform_rates <- transform_rates
@@ -601,7 +604,7 @@ print.summary.mkinfit <- function(x, digits = max(3, getOption("digits") - 3), .
cat("\nOptimised, transformed parameters:\n")
print(signif(x$par, digits = digits))
- if (x$niter != 0) {
+ if (x$calls > 0) {
cat("\nParameter correlation:\n")
if (!is.null(x$cov.unscaled)){
Corr <- cov2cor(x$cov.unscaled)

Contact - Imprint