From be2db49bc0252ce289f8ec563efb38150941acb2 Mon Sep 17 00:00:00 2001 From: jranke Date: Mon, 4 Nov 2013 09:39:36 +0000 Subject: Fixing parameters (initial state and differential equation parameters) now also works in the experimental GUI git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@134 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- inst/GUI/mkinGUI.R | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/inst/GUI/mkinGUI.R b/inst/GUI/mkinGUI.R index 281e8b3..b418b42 100644 --- a/inst/GUI/mkinGUI.R +++ b/inst/GUI/mkinGUI.R @@ -560,13 +560,19 @@ run_fit <- function() { Parameters <- f.gg.parms[,] Parameters.de <- subset(Parameters, Type == "deparm") deparms <- Parameters.de$Initial - names(deparms) <- rownames(Parameters.de) + names(deparms) <- Parameters.de$Name + defixed <- names(deparms[Parameters.de$Fixed]) + Parameters.ini <- subset(Parameters, Type == "state") + iniparms <- Parameters.ini$Initial + names(iniparms) <- sub("_0", "", Parameters.ini$Name) + inifixed <- names(iniparms[Parameters.ini$Fixed]) f[[f.cur]] <<- mkinfit(m[[m.i]], override(ds[[ds.i]]$data), - state.ini = subset(Parameters, - Type == "state")$Initial, - solution_type = svalue(f.gg.opts.st), - parms.ini = deparms, - err = "err") + state.ini = iniparms, + fixed_initials = inifixed, + parms.ini = deparms, + fixed_parms = defixed, + solution_type = svalue(f.gg.opts.st), + err = "err") f[[f.cur]]$ds.index <<- ds.i f[[f.cur]]$ds <<- ds[[ds.i]] f[[f.cur]]$m.index <<- m.i -- cgit v1.2.1