Skip to content

Commit

Permalink
use named subsetting instead of sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
LiNk-NY committed Aug 8, 2023
1 parent f7d8a9c commit f507624
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/MultiAssayExperiment-class.R
Expand Up @@ -380,9 +380,9 @@ MultiAssayExperiment <-
colNams <- Filter(function(x) !isEmpty(x), colnames(object))
msg <- NULL
if (length(colNams)) {
logicResult <- mapply(function(x, y) {
identical(sort(x), sort(y))
}, x = colNams, y = assayCols)
logicResult <- mapply(function(x, y, nm) {
identical(x[nm], y[nm])
}, x = colNams, y = assayCols, nm = names(colNams))
if (!all(logicResult))
msg <- "not all ExperimentList samples are found in the sampleMap"
}
Expand Down

0 comments on commit f507624

Please sign in to comment.