# Cohen's Kappa using (irr) and kappa2() outputs z and p-value with NaN

I used the kappa2 function from the irr-library in R, however it returned an invalid z- and p-value and a kappa value of exactly 0. I already looked it up and stumbled upon this article Cohen's Kappa using (irr) and kappa2() outputs NaN, but over there the measurements are exactly the same while in my measurements (see in code below) it is not exactly the same.

I ran this code:

rm(list=ls());
library("irr")

a = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1)
b = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
kappa2(cbind(a, b))


And this output:

Cohen's Kappa for 2 Raters (Weights: unweighted)

Subjects = 36
Raters = 2
Kappa = 0

z = NaN
p-value = NaN


Does anyone have an idea what goes wrong here?