diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2015-10-21 15:33:23 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2015-10-21 15:33:23 +0200 |
commit | ba2141c7721bfdd6453fe5df653612c269828cc0 (patch) | |
tree | 9290b091099d428ac0f68af26c245476b66adb6d | |
parent | 2ded0424ba1a2ad6d6e265dd785b9c5f54d53319 (diff) |
Avoid an error printing old mkinfit summaries
-rw-r--r-- | NEWS.md | 4 | ||||
-rw-r--r-- | R/mkinfit.R | 15 |
2 files changed, 14 insertions, 5 deletions
@@ -12,6 +12,10 @@ - Use an index.r file to group help topics in static documentation +### Bug fixes + +- `print.summary.mkinfit()`: Avoid an error that occurred when printing summaries generated with mkin versions before 0.9-36 + ## mkin 0.9-40 (2015-07-21) ### Bug fixes diff --git a/R/mkinfit.R b/R/mkinfit.R index e2fd2951..4cc92f43 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -684,11 +684,16 @@ print.summary.mkinfit <- function(x, digits = max(3, getOption("digits") - 3), . cat("\nResidual standard error:",
format(signif(x$sigma, digits)), "on", rdf, "degrees of freedom\n")
- cat("\nBacktransformed parameters:\n",
- " Confidence intervals for internally transformed parameters are asymmetric.\n",
- " t-test (unrealistically) based on the assumption of normal distribution\n",
- " for estimators of untransformed parameters.\n", sep = "")
- print(signif(x$bpar[, c(1, 3, 4, 5, 6)], digits = digits))
+ cat("\nBacktransformed parameters:\n")
+ cat(" Confidence intervals for internally transformed parameters are asymmetric.\n")
+ if ((x$version) < "0.9-36") {
+ cat(" To get the usual (questionable) t-test, upgrade mkin and repeat the fit.\n")
+ print(signif(x$bpar, digits = digits))
+ } else {
+ cat(" t-test (unrealistically) based on the assumption of normal distribution\n")
+ cat(" for estimators of untransformed parameters.\n")
+ print(signif(x$bpar[, c(1, 3, 4, 5, 6)], digits = digits))
+ }
cat("\nChi2 error levels in percent:\n")
x$errmin$err.min <- 100 * x$errmin$err.min
|