Simplify your statistical reporting with compact letterdisplays
Thecld package provides an easy and consistent wayto create compact letter displays (CLDs) for visualizing results ofpairwise statistical comparisons. Groups sharing the same letter are notsignificantly different from each other — a convention widely used inagricultural, biological, and statistical publications.
Key Features:
make_cld() handlesall input types automaticallyInstall the stable version from CRAN:
install.packages("cld")Install the development version fromGitHub:
# install.packages("devtools")devtools::install_github("GegznaV/cld")Thecld package works with various statistical testoutputs. Here’s a simple example:
library(cld)# Run a pairwise testtest_result<-pairwise.wilcox.test(chickwts$weight, chickwts$feed,exact =FALSE)# Generate compact letter displaymake_cld(test_result)#> group cld spaced_cld#> casein a a__#> horsebean b _b_#> linseed bc _bc#> meatmeal ac a_c#> soybean c __c#> sunflower a a__Interpretation:
Themake_cld() function works seamlessly with:
| Input Type | Example Packages | Function Examples |
|---|---|---|
pairwise.htest | base R | pairwise.t.test(),pairwise.wilcox.test() |
PMCMR /PMCMRplus | PMCMR, PMCMRplus | kwAllPairsConoverTest(),dunnTest() |
data.frame (rstatix) | rstatix | games_howell_test(),tukey_hsd() |
PostHocTest | DescTools | ConoverTest(),DunnettTest() |
matrix | Custom | Symmetric p-value matrices |
data.frame | Custom | Custom comparison data frames |
formula | Custom | Formula interface for data frames |
📚Comprehensive vignettes (also available onpackage website):
vignette("cld") - Complete introduction withexamplesvignette("cld-input-formats") - Detailed examples forall input typesvignette("cld-interpretation-guide") - How to correctlyinterpret CLDsvignette("cld-advanced-features") - Advanced featuresand custom parameters| Package | Purpose | Relationship to cld |
|---|---|---|
| multcompView | CLD algorithm | Used internally bycld |
| rcompanion | Statistical functions | Alternative CLD implementation |
| PMCMRplus | Post-hoc tests | Compatible input forcld |
| rstatix | Tidy statistics | Compatible input forcld |
| DescTools | Statistical tools | Compatible input forcld |
?cld::make_cldTo cite thecld package in publications:
citation("cld")GPL-3