aboutsummaryrefslogtreecommitdiff
path: root/R/mkinfit.R
diff options
context:
space:
mode:
authorjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2012-04-25 21:50:23 +0000
committerjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2012-04-25 21:50:23 +0000
commit1628fde60496532a610db7fecfc3c19efa56b8d6 (patch)
tree8781bb7dda0cb8f3aabe4810cbcc3c80579b42e1 /R/mkinfit.R
parentc4e8498ee688fff1e1b2df1a7a65f888cb0d9d84 (diff)
- Some more unit tests
- Some more other tests in test.R - Adaptation of mkinplot git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@36 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r--R/mkinfit.R15
1 files changed, 7 insertions, 8 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 6e455e18..cb0396f7 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -170,13 +170,11 @@ mkinfit <- function(mkinmod, observed,
# We need to return some more data for summary and plotting
fit$solution_type <- solution_type
- if (solution_type == "eigen") {
- fit$coefmat <- mkinmod$coefmat
- }
- # We also need various other information for summary and plotting
- fit$map <- mkinmod$map
- fit$diffs <- mkinmod$diffs
+ # We also need the model for summary and plotting
+ fit$mkinmod <- mkinmod
+
+ # We need data and predictions for summary and plotting
fit$observed <- mkin_long_to_wide(observed)
predicted_long <- mkin_wide_to_long(out_predicted, time = "time")
fit$predicted <- out_predicted
@@ -348,6 +346,7 @@ summary.mkinfit <- function(object, data = TRUE, distimes = TRUE, ...) {
Rversion = paste(R.version$major, R.version$minor, sep="."),
date.fit = object$date,
date.summary = date(),
+ use_of_ff = object$mkinmod$use_of_ff,
residuals = object$residuals,
residualVariance = resvar,
sigma = sqrt(resvar),
@@ -358,7 +357,7 @@ summary.mkinfit <- function(object, data = TRUE, distimes = TRUE, ...) {
stopmess = message,
par = param)
- ans$diffs <- object$diffs
+ ans$diffs <- object$mkinmod$diffs
if(data) ans$data <- object$data
ans$start <- object$start
@@ -411,7 +410,7 @@ print.summary.mkinfit <- function(x, digits = max(3, getOption("digits") - 3), .
}
printff <- !is.null(x$ff)
- if(printff){
+ if(printff & x$use_of_ff == "min"){
cat("\nEstimated formation fractions:\n")
print(data.frame(ff = x$ff), digits=digits,...)
}

Contact - Imprint