Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
TuomasBorman committed Oct 7, 2024
1 parent d8ebd53 commit 2aab6d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/plotCCA.R
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ setMethod("plotRDA", signature = c(x = "matrix"),
# Check if variable names can be found metadata
all_var_found <- FALSE
if( !is.null(vector_data) && length(variable_names) > 0 ){
all_var_found <- all(colSums(
unlist(lapply(rownames(vector_data), function(x)
unlist(lapply(variable_names, function(y) grepl(y, x))) ))
) == 1)
all_var_found <- vapply(rownames(vector_data), function(x)
vapply(variable_names, function(y) grepl(y, x), logical(1L)),
logical(ncol(coldata)) )
all_var_found <- all( colSums(all_var_found) == 1)
}

# Get vector labels
Expand Down

0 comments on commit 2aab6d0

Please sign in to comment.