This function performs a Shapiro-Wilk normality test on multiple variables in a dataframe. It returns the results in a tidy format.
Value
A dataframe with the test results. Each row corresponds to a variable, and the columns contain the test statistics and p-values.
Details
The function first reshapes the dataframe to a long format and calculates the sample size for each variable. It then checks if the sample size for any variable is less than 3 or greater than 5000, and if so, aborts the function with an error message because the `shapiro.test()` only expects this range of observations. The function then performs the Shapiro-Wilk test on each variable and returns a formatted dataframe with the test results.