1

I'm analyzing the agreement between two judges scoring the same item using Cohen's Kappa. To do it I'm using R and the Kappa.test() function from the fmsb package. When I run it in R console I don't get an error, but in Jupyter I do.

In R Console

     RD <- c(1,0,0,0,1,1,0,0,1,0)
     BA <- c(1,0,0,1,0,1,0,0,1,0)
     Kappa.test(RD, BA, conf.level=0.95)

$Result

    Estimate Cohen's kappa statistics and test the null hypothesis that the
    extent of agreement is same as random (kappa=0)

data:  RD and BA
Z = 1.7723, p-value = 0.03817
95 percent confidence interval:
 0.06683747 1.09982919
sample estimates:
[1] 0.5833333


$Judgement
[1] "Moderate agreement"

But in Jupyter I get

  Error in vapply(seq_along(mapped), function(i) {: values must be length 1,
     but FUN(X[[1]]) result is length 0
pgcudahy
  • 1,542
  • 13
  • 36
  • Can you please include data and/or code that will provide us with a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) ? In particular, can you post your Jupyter notebook somewhere so we can see it? – Ben Bolker Apr 21 '16 at 21:58
  • no error with your code, you still get the right output. `options(jupyter.display_mimetypes = NULL)` eliminates the message, but I'm not sure what that would be the best solution. or `options(jupyter.display_mimetypes = 'text/plain')` – rawr Apr 21 '16 at 22:21
  • With the tiny data set I used above I get the error. It does give me the right output after throwing that error but I was hoping to get an idea of why its happening and whether I need to double check my results with R console. – pgcudahy Apr 24 '16 at 02:13

0 Answers0