Comprehensive Descriptive and Summary Statistics Engine for Phenotypic Traits
compute_summary_stats.RdThe `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.
Arguments
- data
A verified
data.framecontaining 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 toNULL.- reporting_level
An integer vector flag defining console trace settings:
0for silent,1for descriptive summary grids, and2for intensive diagnostic tracking. Defaults to2.
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)
}