Search code examples
ralphareliability

Error return when running alpha command in r


I am trying to complete a cronbach alpha analysis on my dataframe, but am getting an odd error. My dataset is set up like:

DF

Var1   Var2   Var3   Var4
 A      12     14     A
 C      14     13     D

etc-----

I am using the command: alpha(DF[,c(2:3)] and am getting the following error:

Error: Unknown colour name: c(12, 14,....14, 13

I am assuming the package I need is being blocked by another. Any help is greatly appreciated.


Solution

  • I think I figured it out. I used the following command:

    psych::alpha(DF[,c(2:3)]
    

    Any other suggestions and/or feedback is welcome!