aboutsummaryrefslogtreecommitdiff
path: root/R/mmkin.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-11-12 16:41:10 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-11-12 16:45:53 +0100
commitf6fc5a050442c60d74a1943fa1181b8338322f30 (patch)
tree9a3ff864fc535dc2d5d45791ab7a4189c4087e92 /R/mmkin.R
parentabe4ba27295389374f3ee53be0638275bd958743 (diff)
Model names in lrtest.mmkin, fix for print.mmkin
Fix the display of warnings and errors in print.mmkin, the matrix was erroneously transposed.
Diffstat (limited to 'R/mmkin.R')
-rw-r--r--R/mmkin.R5
1 files changed, 3 insertions, 2 deletions
diff --git a/R/mmkin.R b/R/mmkin.R
index f3c07e42..96453e1d 100644
--- a/R/mmkin.R
+++ b/R/mmkin.R
@@ -98,6 +98,8 @@ mmkin <- function(models = c("SFO", "FOMC", "DFOP"), datasets,
model_index <- w[1]
dataset_index <- w[2]
res <- try(mkinfit(models[[model_index]], datasets[[dataset_index]], ...))
+ if (!inherits(res, "try-error")) res$mkinmod$name <- names(models)[model_index]
+ return(res)
}
if (is.null(cluster)) {
@@ -156,8 +158,7 @@ print.mmkin <- function(x, ...) {
all_summary_warnings <- character()
sww <- 0 # Counter for Shapiro-Wilks warnings
- x_t <- t(x) # To make lapply work by rows
- display <- lapply(x_t,
+ display <- lapply(x,
function(fit) {
if (inherits(fit, "try-error")) return("E")
sw <- fit$summary_warnings

Contact - Imprint