Skip to content

Commit

Permalink
silence many to many relationship warnings from dplyr
Browse files Browse the repository at this point in the history
  • Loading branch information
kriemo committed Jan 25, 2024
1 parent cc57a0a commit 4034d7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ plot_cor <- function(cor_mat,
if (cor_df[[cluster_col]][1] %in% metadata[[cluster_col]]) {
plt_data <- dplyr::left_join(cor_df_long,
metadata,
by = cluster_col
by = cluster_col,
relationship = "many-to-many"
)
} else {
plt_data <- dplyr::left_join(cor_df_long,
Expand Down
3 changes: 2 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@ cor_to_call_topn <- function(cor_mat,
dplyr::select(df_temp_full, -c(
!!dplyr::sym("type"), !!dplyr::sym("r")
)),
by = stats::setNames(collapse_to_cluster, "type2")
by = stats::setNames(collapse_to_cluster, "type2"),
relationship = "many-to-many"
)
df_temp_full <-
dplyr::mutate(df_temp_full2, type = tidyr::replace_na(
Expand Down

0 comments on commit 4034d7d

Please sign in to comment.