diff options
author | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2013-10-17 13:24:42 +0000 |
---|---|---|
committer | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2013-10-17 13:24:42 +0000 |
commit | ca1420000183be00ede5333ad9a34e5a9d703953 (patch) | |
tree | 5a089e83652c017f9021ae1a82cf164dc9930cfc /R/mkinfit.R | |
parent | 0e352cae56c006a5636a1aaf3b40e2eee2c1c941 (diff) |
- Fix reweighting for the case of many metabolites
git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@118 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r-- | R/mkinfit.R | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R index 70ca9c0..83ac087 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -215,7 +215,7 @@ mkinfit <- function(mkinmod, observed, while (reweight.diff > reweight.tol & n.iter < reweight.max.iter) {
n.iter <- n.iter + 1
sigma.old <- sqrt(fit$var_ms_unweighted)
- observed[err] <- sqrt(fit$var_ms_unweighted)[observed$name]
+ observed[err] <- sqrt(fit$var_ms_unweighted)[as.character(observed$name)]
fit <- modFit(cost, fit$par, method = method.modFit,
control = control.modFit, ...)
reweight.diff = sum((sqrt(fit$var_ms_unweighted) - sigma.old)^2)
|