F1score <- function(t) { P1 <- colSums(t)[1] P2 <- rowSums(t)[1] f <- 2*t[1,1]/(P1+P2) return (f) }