Contrasts can be applied only to factor

后端 未结 3 597
一生所求
一生所求 2020-12-06 05:48

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

3条回答
  •  心在旅途
    2020-12-06 06:26

    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.

提交回复
热议问题