f_stat_diff_of_means_medians: calculates maximum difference in group means and medians

Description Usage Arguments Value Examples

View source: R/f_stat.R

Description

used as a helper function for f_stat_anova

Usage

1
f_stat_diff_of_means_medians(df, col_group, col_variable)

Arguments

df

dataframe

col_group

character vector denoting grouping variable

col_variable

character vector denoting variable

Value

dataframe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
set.seed(1)
df = tibble( fct = sample(LETTERS[1:5], 100, replace = T)
             , v1  = 1
             , v2  = rnorm(100, 4)
             , v3  = c( rep(3, 50), rep(8,50) )
)

col_group = 'fct'

f_stat_diff_of_means_medians(df, col_group, 'v1') %>%
  bind_rows( f_stat_diff_of_means_medians(df, col_group, 'v2') ) %>%
  bind_rows( f_stat_diff_of_means_medians(df, col_group, 'v3') )

erblast/oetteR documentation built on Feb. 15, 2018, 5:12 p.m.