diff options
author | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2013-11-04 09:39:36 +0000 |
---|---|---|
committer | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2013-11-04 09:39:36 +0000 |
commit | be2db49bc0252ce289f8ec563efb38150941acb2 (patch) | |
tree | d3461ecc0335901d9228998c685a420e6b2f5959 /inst/GUI/mkinGUI.R | |
parent | 108955dfe9f328605844b5bfa6ed10190cb739e3 (diff) |
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
Diffstat (limited to 'inst/GUI/mkinGUI.R')
-rw-r--r-- | inst/GUI/mkinGUI.R | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/inst/GUI/mkinGUI.R b/inst/GUI/mkinGUI.R index 281e8b32..b418b42d 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
|