aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-10-06 20:17:17 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2014-10-06 20:17:17 +0200
commit45942cc099c258fa07f42691cf2e2ee163f3b6d6 (patch)
treea0ee54f4368a4042e58b0cdb6b4665ad03836c3e
parentdb8b6a43fec8d052b853f272e016079d0a9f91b6 (diff)
Avoid a warning produced by initial fits in gmkin
-rw-r--r--NEWS.md3
-rw-r--r--R/mkinfit.R16
2 files changed, 11 insertions, 8 deletions
diff --git a/NEWS.md b/NEWS.md
index 0d690b37..19745300 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -16,13 +16,14 @@
- `plot.mkinfit()`: Avoid a warning message about only using the first component of ylim that occurred when ylim was specified explicitly
-
## MINOR CHANGES
- The formatting of differential equations in the summary was improved by wrapping overly long lines
- The FOCUS_Z vignette was rebuilt with the above improvement and using a width of 70 to avoid output outside of the grey area
+- `print.summary.mkinfit()`: Avoid a warning that occurred when gmkin showed summaries ofinitial fits without iterations
+
# CHANGES in mkin VERSION 0.9-32
## NEW FEATURES
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 0f488ec8..5c1de846 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -594,13 +594,15 @@ print.summary.mkinfit <- function(x, digits = max(3, getOption("digits") - 3), .
cat("\nOptimised, transformed parameters:\n")
print(signif(x$par, digits = digits))
- cat("\nParameter correlation:\n")
- if (!is.null(x$cov.unscaled)){
- Corr <- cov2cor(x$cov.unscaled)
- rownames(Corr) <- colnames(Corr) <- rownames(x$par)
- print(Corr, digits = digits, ...)
- } else {
- cat("Could not estimate covariance matrix; singular system:\n")
+ if (x$niter != 0) {
+ cat("\nParameter correlation:\n")
+ if (!is.null(x$cov.unscaled)){
+ Corr <- cov2cor(x$cov.unscaled)
+ rownames(Corr) <- colnames(Corr) <- rownames(x$par)
+ print(Corr, digits = digits, ...)
+ } else {
+ cat("Could not estimate covariance matrix; singular system:\n")
+ }
}
cat("\nResidual standard error:",

Contact - Imprint