Skip to content

Commit

Permalink
fix wrong detection
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Dec 2, 2024
1 parent ce7b972 commit fd3148d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/cor_sort.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ cor_sort.easycormatrix <- function(x, distance = "correlation", hclust_method =

#' @export
cor_sort.matrix <- function(x, distance = "correlation", hclust_method = "complete", ...) {
if(isSquare(x)) {
if(isSquare(x) & all(colnames(x) %in% rownames(x))) {

Check warning on line 81 in R/cor_sort.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/cor_sort.R,line=81,col=5,[spaces_left_parentheses_linter] Place a space before left parenthesis, except in a function call.

Check warning on line 81 in R/cor_sort.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/cor_sort.R,line=81,col=18,[vector_logic_linter] Use `&&` in conditional expressions.

Check warning on line 81 in R/cor_sort.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/cor_sort.R,line=81,col=5,[spaces_left_parentheses_linter] Place a space before left parenthesis, except in a function call.

Check warning on line 81 in R/cor_sort.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/cor_sort.R,line=81,col=18,[vector_logic_linter] Use `&&` in conditional expressions.
i <- .cor_sort_square(x, distance = distance, hclust_method = hclust_method, ...)
} else {
i <- .cor_sort_nonsquare(x, distance = "euclidean", ...)
Expand Down

0 comments on commit fd3148d

Please sign in to comment.