Im trying to use the confusion matrix from library(carot) to determine if the which column is more accurate and Im running into trouble. Im trying to see if column df$G5 is more accurate than df$G9 when compared to df$GE. The methods I've tried in the past arent working and Im not sure how to proceed with the matrix. The main error I keep running into is "Error: data and reference should be factors with the same levels".
df <- 
  C      P           I   R A    S  GE  G5 A5   G9 A9          AF
1 8 163302 rs141069412 CAT C NONE 1/1 1/1  1 <NA> NA 9.33843e-01
2 8 163366  rs34810249   T C NONE 0/1 0/1  1  1/0  1 2.07735e-01
3 8 163370   rs7844253   C G NONE 1/1 1/1  1  1/1  1 9.28438e-01
4 8 163387   rs3008286   C T NONE 0/1 0/1  1  0/1  1 7.17963e-01
5 8 163432   rs3008285   A G NONE 0/1 0/0  0 <NA> NA 1.02935e-01
6 8 163438   rs7844396   C T NONE 1/1 1/1  1  1/1  1 9.28281e-01
