From bc96603746126580090db2efbf48213961b5ec9e Mon Sep 17 00:00:00 2001 From: LiNk-NY Date: Fri, 11 Aug 2023 13:14:53 -0400 Subject: [PATCH] bug fix: ensure ExperimentList order is the same when comparing column names --- R/MultiAssayExperiment-class.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/MultiAssayExperiment-class.R b/R/MultiAssayExperiment-class.R index d5ec248..78ffaa0 100644 --- a/R/MultiAssayExperiment-class.R +++ b/R/MultiAssayExperiment-class.R @@ -380,9 +380,9 @@ MultiAssayExperiment <- colNams <- Filter(function(x) !isEmpty(x), colnames(object)) msg <- NULL if (length(colNams)) { - logicResult <- mapply(function(x, y, nm) { + logicResult <- mapply(function(x, y) { identical(sort(x), sort(y)) - }, x = colNams, y = assayCols, nm = names(colNams)) + }, x = colNams, y = assayCols[names(colNams)]) if (!all(logicResult)) msg <- "not all ExperimentList samples are found in the sampleMap" }