internal_stats: letter_groups internal helper function

Description Usage Arguments

View source: R/internal_stats.R

Description

Internal helper that is called after the grouping.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
internal_stats(
  df,
  y,
  x,
  stat_method,
  print_position,
  print_adjust,
  stat_alpha,
  p_adj_method,
  table
)

Arguments

df

A data frame.

y

The name of the y (dependent) variable.

x

The name of the x (independent) variable.

stat_method

The statistical test applied. Either "tukey" or "kruskal".

print_position

The y position at which the letter annotation will be placed in the plot. One of "above", "mean", "below", or a numeric value.

print_adjust

Adjustment of the letter position multiples of the overall standard deviations. Defaults to 1.

stat_alpha

The significance threshold alpha. Defaults to 0.05.

p_adj_method

Method for p value adjustment, see ?dunn.test::dunn.test for details. One of "none", "bonferroni", "sidak", "holm", "hs", "hochberg", "bh", "by". Defaults to "holm".

table

A logical value indicating whether to return a data frame with the letter codes according to significance (table = FALSE, default), or a table containing the calculated statistics (P-values, df, etc.).


leonardblaschek/tukeygrps documentation built on Sept. 26, 2021, 9:15 a.m.