Performs Shapiro-Wilk tests to check the normality of numeric exposure variables in colData
of a MultiAssayExperiment
object.
Value
A MultiAssayExperiment
object with normality results added to metadata (if action = "add"
) or a list with:
- norm_df
A data frame of Shapiro-Wilk test results for each exposure variable.
- norm_plot
A ggplot object showing the distribution of normal and non-normal exposures.
Details
This function:
Extracts numeric, non-constant exposure variables from
colData
.Runs Shapiro-Wilk tests to assess normality.
Summarizes the number of normally and non-normally distributed exposures.
Generates a bar plot visualizing the normality results.
Output Handling:
"add"
: Stores results inmetadata(expomicset)$normality
."get"
: Returns a list containing the normality test results and plot.