I am getting this error message when I try using confusionMatrix Error: data and reference should be factors with the same levels. This is my code
data
reference