aboutsummaryrefslogtreecommitdiff
path: root/R/mean_degparms.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-04-09 06:21:23 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-04-09 06:21:23 +0200
commitc29e27b9bf5f5361db44e28b06da7b8a1e636e85 (patch)
tree4f1b44f2cc6981c8fef8a2085783ad9dc2bdb306 /R/mean_degparms.R
parent2728910b96f0ec7dd7ccd97fc6c1f6677e5e352d (diff)
Improvements to mean_degparms() and plot.mixed.mmkin()
- New argument 'default_log_parms' for mean_degparms() - 'plot.mixed.mmkin': Pass the frame argument also to residual plots, take the 'default_log_parms' argument for 'mean_degparms' used for constructing approximate population curves, plot population curve last to avoid that it is covered by data
Diffstat (limited to 'R/mean_degparms.R')
-rw-r--r--R/mean_degparms.R8
1 files changed, 6 insertions, 2 deletions
diff --git a/R/mean_degparms.R b/R/mean_degparms.R
index ec20c068..fdcc5c00 100644
--- a/R/mean_degparms.R
+++ b/R/mean_degparms.R
@@ -11,8 +11,12 @@
#' rate constants) pass the t-test for significant difference from zero.
#' @param conf.level Possibility to adjust the required confidence level
#' for parameter that are tested if requested by 'test_log_parms'.
+#' @param default_log_parms If set to a numeric value, this is used
+#' as a default value for the tested log parameters that failed the
+#' t-test.
#' @export
-mean_degparms <- function(object, random = FALSE, test_log_parms = FALSE, conf.level = 0.6)
+mean_degparms <- function(object, random = FALSE, test_log_parms = FALSE, conf.level = 0.6,
+ default_log_parms = NA)
{
if (nrow(object) > 1) stop("Only row objects allowed")
parm_mat_trans <- sapply(object, parms, transformed = TRUE)
@@ -33,7 +37,7 @@ mean_degparms <- function(object, random = FALSE, test_log_parms = FALSE, conf.l
parm_mat_trans_OK <- parm_mat_trans
for (trans_parm in log_parm_trans_names) {
parm_mat_trans_OK[trans_parm, ] <- ifelse(t_test_back_OK[trans_parm, ],
- parm_mat_trans[trans_parm, ], NA)
+ parm_mat_trans[trans_parm, ], default_log_parms)
}
} else {
parm_mat_trans_OK <- parm_mat_trans

Contact - Imprint