I am conducting the Levene's test as well as Shapiro-Wilk test on a large set of data. I am wondering how do I access to particular parts of a result and store them in a CSV file to simplify reporting results.
For example, a Levene's test results look like this in R:
> leveneTest(Var~Label, data = df)
Df F value Pr(>F)
group 3 0.7595 0.5183
166
How can I get only F-value and p-value stored in separate variables? Same as W and p-value in the following:
> shapiro.test(df[,i])
Shapiro-Wilk normality test
data: dfc[, i]
W = 0.70952, p-value < 2.2e-16