aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-01-17 16:27:46 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2014-01-17 16:27:46 +0100
commitaf4a101d2cca91598ec5d1dc297c31a75517b139 (patch)
treec1a15831bd668f96b5b4a3b0308af7977ac335ea
parent66620036c4943c03072b113a63fcd983390102b8 (diff)
- Use mkinmod$spec instead of mkinmod$map wherever possible, in order to make it possible to
to modify mkinmod$map when the mapping of internal to observed variables should be changed. Note that such modifications will confuse plot.mkinfit and summary.mkinfit. Setting the class attribute to modFit makes summary.modFit useable in such a case
-rw-r--r--DESCRIPTION2
-rw-r--r--R/mkinfit.R8
2 files changed, 5 insertions, 5 deletions
diff --git a/DESCRIPTION b/DESCRIPTION
index 5c55e362..14abd500 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -3,7 +3,7 @@ Type: Package
Title: Routines for fitting kinetic models with one or more state
variables to chemical degradation data
Version: 0.9-25
-Date: 2013-11-18
+Date: 2014-01-17
Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre"),
email = "jranke@uni-bremen.de"),
person("Katrin", "Lindenberger", role = "ctb"),
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 3e47479f..fd536277 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -1,6 +1,6 @@
# $Id$
-# Copyright (C) 2010-2013 Johannes Ranke
+# Copyright (C) 2010-2014 Johannes Ranke
# Contact: jranke@uni-bremen.de
# The summary function is an adapted and extended version of summary.modFit
# from the FME package, v 1.1 by Soetart and Petzoldt, which was in turn
@@ -42,7 +42,7 @@ mkinfit <- function(mkinmod, observed,
mod_vars <- names(mkinmod$diffs)
# Get the names of observed variables
- obs_vars = names(mkinmod$map)
+ obs_vars = names(mkinmod$spec)
# Subset observed data with names of observed data in the model
observed <- subset(observed, name %in% obs_vars)
@@ -110,12 +110,12 @@ mkinfit <- function(mkinmod, observed,
# or a numeric ode solver from the deSolve package
if (!solution_type %in% c("auto", "analytical", "eigen", "deSolve"))
stop("solution_type must be auto, analytical, eigen or de Solve")
- if (solution_type == "analytical" && length(mkinmod$map) > 1)
+ if (solution_type == "analytical" && length(mkinmod$spec) > 1)
stop("Analytical solution not implemented for models with metabolites.")
if (solution_type == "eigen" && !is.matrix(mkinmod$coefmat))
stop("Eigenvalue based solution not possible, coefficient matrix not present.")
if (solution_type == "auto") {
- if (length(mkinmod$map) == 1) {
+ if (length(mkinmod$spec) == 1) {
solution_type = "analytical"
} else {
if (is.matrix(mkinmod$coefmat)) {

Contact - Imprint