|
57 | 57 | #' @param highlight_size A numeric value to specify the size of the highlighted points.
|
58 | 58 | #' @param highlight_alpha A numeric value to specify the transparency of the highlighted points.
|
59 | 59 | #' @param comparisons A logical value or a list of vectors to perform pairwise comparisons.
|
| 60 | +#' If `TRUE`, it will perform pairwise comparisons for all pairs. |
60 | 61 | #' @param ref_group A character string to specify the reference group for comparisons.
|
61 | 62 | #' @param pairwise_method A character string to specify the pairwise comparison method.
|
62 | 63 | #' @param multiplegroup_comparisons A logical value to perform multiple group comparisons.
|
|
65 | 66 | #' @param sig_labelsize A numeric value to specify the size of the significance test label.
|
66 | 67 | #' @return A ggplot object
|
67 | 68 | #' @keywords internal
|
| 69 | +#' @importFrom utils combn |
68 | 70 | #' @importFrom stats median quantile
|
69 | 71 | #' @importFrom rlang sym syms parse_expr
|
70 | 72 | #' @importFrom dplyr mutate ungroup first
|
@@ -114,7 +116,8 @@ BoxViolinPlotAtomic <- function(
|
114 | 116 | )
|
115 | 117 | facet_by <- check_columns(data, facet_by, force_factor = TRUE, allow_multi = TRUE)
|
116 | 118 | if (isTRUE(comparisons) && is.null(group_by)) {
|
117 |
| - stop("'group_by' must be provided to when 'comparisons' is TRUE.") |
| 119 | + # stop("'group_by' must be provided to when 'comparisons' is TRUE.") |
| 120 | + comparisons <- combn(levels(data[[x]]), 2, simplify = FALSE) |
118 | 121 | }
|
119 | 122 | if (isTRUE(multiplegroup_comparisons) || length(comparisons) > 0) {
|
120 | 123 | # if (!requireNamespace("ggpubr", quietly = TRUE)) {
|
|
0 commit comments