From 4454c47f247b00ff8ed2d96af8c707d6b475db6e Mon Sep 17 00:00:00 2001 From: Helios Date: Fri, 30 May 2025 13:30:05 +0200 Subject: [PATCH] fix number of columns in residual row of testInteractions --- R/testInteractions.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/testInteractions.R b/R/testInteractions.R index 85911b8..2d790ac 100644 --- a/R/testInteractions.R +++ b/R/testInteractions.R @@ -123,7 +123,8 @@ testInteractions <- function(model, pairwise=NULL, fixed=NULL, residual=NULL, ac rownames(anova.table) <- combination.labels # Add row for residuals, if existed in the anova table if (nrow(test.table) > 1){ - anova.table <- rbind(anova.table,Residuals=c(matrix(,ncol=length(adjusted.values)),unlist(test.table[2,]))) + nblank <- ncol(anova.table) - ncol(test.table) + anova.table <- rbind(anova.table,Residuals=c(matrix(,ncol=nblank),unlist(test.table[2,]))) } # Attach combination labels and make anova table class heading <- attr(summary(test)$anova.table,"heading")