diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2016-06-27 13:21:39 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2016-06-27 13:38:38 +0200 |
commit | 4b0b5346a9f026c5a19d452e4649326fe56d464c (patch) | |
tree | 2795eb7eaf6f68dfd6fbbcb8a3cf92224cf81f0d /R/mkinfit.R | |
parent | b14fe21e176f523e800793102fb5634e468b3165 (diff) |
Improve listing of weights in output, update NEWS
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r-- | R/mkinfit.R | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R index c6b6915c..4c4a9717 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -513,13 +513,19 @@ mkinfit <- function(mkinmod, observed, data$name <- ordered(data$name, levels = obs_vars)
data <- data[order(data$name, data$time), ]
+ # Add a column named "value" holding the observed values for the case
+ # that this column was selected for manual weighting, so it can be
+ # shown in the summary as "err"
+ data$value <- data$value.x
+
fit$data <- data.frame(time = data$time,
variable = data$name,
observed = data$value.x,
predicted = data$value.y)
+
fit$data$residual <- fit$data$observed - fit$data$predicted
if (!is.null(data$err.ini)) fit$data$err.ini <- data$err.ini
- if (!is.null(err)) fit$data[[err]] <- data[[err]]
+ if (!is.null(err)) fit$data[["err"]] <- data[[err]]
fit$atol <- atol
fit$rtol <- rtol
|