make_cld_df: *!!* Make a data frame with cld

Description Usage Arguments Note

View source: R/make_cld_df.R

Description

Compute a compact letter display (cld) of statistically significant differences in pairwise comparisons and output he results as a dataframe.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
make_cld_df(
  formula = NULL,
  data = NULL,
  comparison = NULL,
  p.value = NULL,
  threshold = 0.05,
  print.comp = FALSE,
  remove.space = TRUE,
  remove.equal = TRUE,
  swap.colon = TRUE,
  swap.vs = FALSE,
  reversed = FALSE,
  swap_compared_names = FALSE,
  ...
)

Arguments

formula

A formula indicating the variable holding p-values and the variable holding the comparisons. e.g. P.adj ~ Comparison.

data

The data frame to use.

comparison

A vector of text describing comparisons, with each element in a form similar to "Treat.A - Treat.B = 0". Spaces and "=" and "0" are removed by default

p.value

A vector of p-values corresponding to the comparisons in the comparison argument

threshold

The alpha value. That is, the p-value below which the comparison will be considered significant

print.comp

If TRUE, prints out a data frame of the modified text of the comparisons. Useful for debugging

remove.space

If TRUE, removes spaces from the text of the comparisons

remove.equal

If TRUE, removes "=" from the text of the comparisons

swap.colon

If TRUE, swaps ":" with "-" in the text of the comparisons

swap.vs

If TRUE, swaps "vs" with "-" in the text of the comparisons

reversed

A logical value indicating whether the order of the letters should be reversed. Defaults to FALSE.

swap_compared_names

(logical)
If TRUE, group names are swapped from, e.g., "2-1" or "second-first" to "1-2" or "first-second". This leads to different order of cld letters and different order of compared groups (if without swapping the result is incorrect order of groups.)

...

Additional arguments passed to multcompLetters

Note

This function is based on code in function rcompanion::cldList() from package rcompanion by Salvatore Mangiafico.


GegznaV/BioStat documentation built on Aug. 14, 2020, 9:30 p.m.