I have -simplified - a table in R with the following structure:
id coder evaluation
1 1 1
2 1 2
3 1 1
1 2 1
2 2 2
3 2 3
4 2 3
2 3 3
3 3 3
4 3 3
1 4 1
2 4 2
4 4 1
My goal is to create following matrix:
[,1] [,2] [,3] [,4]
[1,] 1 2 1 NA
[2,] 1 2 3 3
[3,] NA 3 3 3
[4,] 1 2 NA 1
I need the matrix as an input to evaluate inter-rater reliability with the IRR package. I tried to transpose via t() but I feel I need something like a pivot table that can handle the NA.
Thanks for your help!