MyNixOS website logo
Description

Create Compact Letter Display (CLD) for Statistical Comparisons.

Creates compact letter displays (CLDs) for pairwise comparisons from statistical post-hoc tests. Groups sharing the same letter are not significantly different from each other. Supports multiple input formats including results from 'stats' pairwise tests, 'DescTools', 'PMCMRplus', 'rstatix', symmetric matrices of p-values, and data frames. Provides a consistent interface for visualizing statistical groupings across different testing frameworks.

cld: Compact Letter Display for Statistical Comparisons

CRANstatus GitHubversion R-CMD-check Codecov Updated-on

Simplify your statistical reporting with compact letter displays

The cld package provides an easy and consistent way to create compact letter displays (CLDs) for visualizing results of pairwise statistical comparisons. Groups sharing the same letter are not significantly different from each other β€” a convention widely used in agricultural, biological, and statistical publications.

Why Use cld?

Key Features:

  • πŸ”„ Universal compatibility - Works with base R, PMCMRplus, rstatix, DescTools, and custom formats
  • 🎯 One function - make_cld() handles all input types automatically
  • πŸ“Š Publication-ready - Clean, professional statistical grouping labels
  • πŸ“ Informative - Stores metadata (alpha, method, comparison counts)
  • πŸ› οΈ Well-tested - Comprehensive unit tests ensure reliability

Installation

Install the stable version from CRAN:

install.packages("cld")

Install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("GegznaV/cld")

Quick Start

The cld package works with various statistical test outputs. Here’s a simple example:

library(cld)

# Run a pairwise test
test_result <- pairwise.wilcox.test(chickwts$weight, chickwts$feed, exact = FALSE)

# Generate compact letter display
make_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:

  • Groups sharing at least one letter are not significantly different (e.g., casein and sunflower both have β€œa”);
  • Groups with no shared letters are significantly different (e.g., horsebean β€œb” and soybean β€œc”).

Supported Input Formats

The make_cld() function works seamlessly with:

Input TypeExample PackagesFunction Examples
pairwise.htestbase Rpairwise.t.test(), pairwise.wilcox.test()
PMCMR / PMCMRplusPMCMR, PMCMRpluskwAllPairsConoverTest(), dunnTest()
data.frame (rstatix)rstatixgames_howell_test(), tukey_hsd()
PostHocTestDescToolsConoverTest(), DunnettTest()
matrixCustomSymmetric p-value matrices
data.frameCustomCustom comparison data frames
formulaCustomFormula interface for data frames

Learn More

πŸ“š Comprehensive vignettes (also available on package website):

  • vignette("cld") - Complete introduction with examples
  • vignette("cld-input-formats") - Detailed examples for all input types
  • vignette("cld-interpretation-guide") - How to correctly interpret CLDs
  • vignette("cld-advanced-features") - Advanced features and custom parameters

Related Packages

PackagePurposeRelationship to cld
multcompViewCLD algorithmUsed internally by cld
rcompanionStatistical functionsAlternative CLD implementation
PMCMRplusPost-hoc testsCompatible input for cld
rstatixTidy statisticsCompatible input for cld
DescToolsStatistical toolsCompatible input for cld

Getting Help

Citation

To cite the cld package in publications:

citation("cld")

License

GPL-3

Metadata

Version

0.0.1

License

Unknown

PlatformsΒ (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows