Learn R Programming

dentomedical (version 0.2.0)

sum_norm: Normality Test Summary Table for Numeric Variables

Description

This function performs the Shapiro-Wilk normality test on all numeric variables in a dataset and returns the results in a publication-ready flextable. Extremely small p-values are displayed as "p < 0.001". The function automatically detects numeric variables and ignores non-numeric columns.

Value

A flextable summarizing each numeric variable with Shapiro-Wilk W statistic, formatted p-value, and distribution classification ("Normal" or "Skewed").

Arguments

data

A data frame containing numeric and non-numeric variables. Only numeric variables are assessed for normality.

sample_size

Integer. Maximum number of observations to use for the Shapiro-Wilk test per variable (default = 5000).

Examples

Run this code
sum_norm(iris)

Run the code above in your browser using DataLab