-
Notifications
You must be signed in to change notification settings - Fork 1
/
3.r
19 lines (14 loc) · 977 Bytes
/
3.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
source("https://raw.githubusercontent.com/hkil/m/master/s.r")
dat <- data.frame(Coder1 = c(1, 1, 1, 1, 1, 1, 1, 1, 0, 0),
Coder2 = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1))
lst <- lapply(0:8, function(x) {dat[0:x, ] <- 0; dat })
ESL <- sapply(lst, sum)
EFL <- sum(lengths(dat)) - ESL
inter <- sapply(lst, irr)
plot(1:9, inter[1,], type = "b", ylim = c(min(inter[1,]), 0.7), ylab = "IRR", panel.f = abline(h = 0, col = 8), xaxt = "n", yaxt = "n",
xlab = "ESL:EFL Frequency", font.lab = 2, pch = 19, las = 1, mgp = c(1.5, .55, 0), padj = .4, cex.axis = .7, cex.lab = .7)
axis(1, at = 1:9, labels = paste0("(", ESL, ":", EFL, ")"), cex.axis = .7, mgp = c(1, .3, 0))
axis(2, at = c(-.1, 0:6*.1), cex.axis = .7, mgp = c(1.5, .55, 0), las = 1, padj = .4)
lines(1:9, inter[2,], type = "b", col = 2, lty = 2, pch = 19)
legend("top", c("Kappa", "S index"), pch = 19, col = 1:2, lty = c(1,2), bty = "n",
text.font = 2, cex = .8, horiz = T)