diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2015-06-20 01:06:24 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2015-06-20 03:59:56 +0200 |
commit | 062b9cc1d084e8bb5e552076fc48ade4b3050644 (patch) | |
tree | bfb8acaf64fbbefbd7423cf6d0cfdb5119120a26 /R/transform_odeparms.R | |
parent | 6281424beafe531c9891670c3227ab12e9a21990 (diff) |
Low-level generation of compiled models
As it is unclear if and when ccSolve will be published on CRAN,
the generation, compilation and use of the C version of the
system of differential equations was developed for mkin, inspired and
guided by the code from the ccSolve package. Many thanks again to
Karline Soetaert for all of her work on this and other R packages.
Now all model types, including the Hockey-Stick model for the parent
compund and the IORE model for parent and/or metabolites can be compiled.
Diffstat (limited to 'R/transform_odeparms.R')
-rw-r--r-- | R/transform_odeparms.R | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/R/transform_odeparms.R b/R/transform_odeparms.R index aa70a0b3..0946ff14 100644 --- a/R/transform_odeparms.R +++ b/R/transform_odeparms.R @@ -33,8 +33,8 @@ transform_odeparms <- function(parms, mkinmod, # Log transformation for rate constants if requested
k <- parms[grep("^k_", names(parms))]
- k.iore <- parms[grep("^k.iore_", names(parms))]
- k <- c(k, k.iore)
+ k__iore <- parms[grep("^k__iore_", names(parms))]
+ k <- c(k, k__iore)
if (length(k) > 0) {
if(transform_rates) {
transparms[paste0("log_", names(k))] <- log(k)
@@ -113,8 +113,8 @@ backtransform_odeparms <- function(transparms, mkinmod, # Exponential transformation for rate constants
if(transform_rates) {
trans_k <- transparms[grep("^log_k_", names(transparms))]
- trans_k.iore <- transparms[grep("^log_k.iore_", names(transparms))]
- trans_k = c(trans_k, trans_k.iore)
+ trans_k__iore <- transparms[grep("^log_k__iore_", names(transparms))]
+ trans_k = c(trans_k, trans_k__iore)
if (length(trans_k) > 0) {
k_names <- gsub("^log_k", "k", names(trans_k))
parms[k_names] <- exp(trans_k)
@@ -122,8 +122,8 @@ backtransform_odeparms <- function(transparms, mkinmod, } else {
trans_k <- transparms[grep("^k_", names(transparms))]
parms[names(trans_k)] <- trans_k
- trans_k.iore <- transparms[grep("^k.iore_", names(transparms))]
- parms[names(trans_k.iore)] <- trans_k.iore
+ trans_k__iore <- transparms[grep("^k__iore_", names(transparms))]
+ parms[names(trans_k__iore)] <- trans_k__iore
}
# Do not transform exponents in IORE models
|