Package 'statdecideR'

Title: Automated Statistical Analysis and Plotting with CLD
Description: A lightweight tool that provides a reproducible workflow for selecting and executing appropriate statistical analysis in one-way or two-way experimental designs. The package automatically checks for data normality, conducts parametric (ANOVA) or non-parametric (Kruskal-Wallis) tests, performs post-hoc comparisons with Compact Letter Displays (CLD), and generates publication-ready boxplots, faceted plots, and heatmaps. It is designed for researchers seeking fast, automated statistical summaries and visualization. Based on established statistical methods including Shapiro and Wilk (1965) <doi:10.2307/2333709>, Kruskal and Wallis (1952) <doi:10.1080/01621459.1952.10483441>, Tukey (1949) <doi:10.2307/3001913>, Fisher (1925) <ISBN:0050021702>, and Wickham (2016) <ISBN:978-3-319-24277-4>.
Authors: Subhradip Bhattacharjee [aut, cre] (ORCID: <https://orcid.org/0000-0003-2330-2979>), Bappa Das [aut, ctb] (ORCID: <https://orcid.org/0000-0003-1286-1492>), Parveen Kumar [aut, ctb] (ORCID: <https://orcid.org/0000-0001-9352-8303>), Rakesh Kumar [aut, ctb] (ORCID: <https://orcid.org/0000-0002-9711-0964>), Amitava Panja [aut, ctb] (ORCID: <https://orcid.org/0000-0002-6226-2933>), Pritam Roy [aut, ctb], Divyacrotu Majumder [aut, ctb], Susanta Dutta [aut, ctb] (ORCID: <https://orcid.org/0000-0003-0885-9744>), Indian Council of Agricultural Research [cph]
Maintainer: Subhradip Bhattacharjee <[email protected]>
License: MIT + file LICENSE
Version: 0.1.6
Built: 2026-05-20 08:00:00 UTC
Source: https://github.com/cran/statdecideR

Help Index


Example Data for Non-parametric test

Description

An example dataset of pollen collection by honeybee at different times and different months.

Usage

df_nonparam

Format

An object of class data.frame with 132 rows and 3 columns.


Run Statistical Decision Workflow

Description

Automatically checks normality, selects appropriate test (ANOVA or Kruskal-Wallis), performs post-hoc, and visualizes results with compact letter display (CLD). Returns all results as an object with optional console output.

Usage

run_statdecide(data, dep_var, group_vars, cld_offset = 5, verbose = TRUE)

Arguments

data

A data frame.

dep_var

Character. Name of the dependent variable.

group_vars

Character vector. One or two grouping variables.

cld_offset

Numeric. Vertical offset to place CLD labels above the boxplot (default: 5).

verbose

Logical. Whether to print progress messages and results (default: TRUE).

Value

A list containing:

normality_test

Results of Shapiro-Wilk test

main_effects

Results for each main effect

interaction

Interaction results (if 2 group_vars)

plots

List of ggplot objects

facet_plot

Faceted ggplot (if 2 group_vars)

heatmap

Heatmap ggplot (if 2 group_vars)

Examples

# Silent operation
results <- run_statdecide(data = df_nonparam, dep_var = "Pollen",
                         group_vars = c("Month","Time"), verbose = FALSE)

# With console output
run_statdecide(data = df_nonparam, dep_var = "Pollen", group_vars = "Month")