Skip to contents

The `compute_summary_stats` function performs an exhaustive descriptive statistical sweep across multiple numeric traits in an agricultural dataset. It calculates central tendency, dispersion, and distribution shape metrics (skewness and kurtosis) for line screening.

Usage

compute_summary_stats(data, traits = NULL, reporting_level = 2)

Arguments

data

A verified data.frame containing the experimental trial records.

traits

A character vector specifying the exact column names to analyze. If NULL, the system automatically discovers and evaluates all numeric columns. Defaults to NULL.

reporting_level

An integer vector flag defining console trace settings: 0 for silent, 1 for descriptive summary grids, and 2 for intensive diagnostic tracking. Defaults to 2.

Value

A detailed structured data.frame where rows represent traits and columns contain calculated metrics.

Details

Before executing hypothesis testing models like ANOVA, establishing dataset distribution profiles is critical. This engine parses target numerical vectors to extract metrics: Standard Error of the Mean is calculated as \(SE = \frac{SD}{\sqrt{n}}\), Skewness measures distribution asymmetry, and Kurtosis indicates tail weight relative to a normal curve. It dynamically filters out environmental factors like 'Genotype' or 'Replication' and targets purely phenotypic observations.

Examples

if (interactive()) {
   # Generate standard summary profiles across all phenotypic traits
   descriptive_grid <- compute_summary_stats(data = gv_data)
   print(descriptive_grid)
}