I have a question about R.
I am using a test called levene.test to test a homogeneity of variance.
I know that you need a factor variable with at least two l
If your factor has only one level, you will get this error. To check to see the levels of your factor variables, use lapply(df, levels). It will return nothing for non-factor variables, but will easily let you identify which variable is the offender. This is especially helpful if, like me, you have hundreds of variables.