"0","sumarizator2 <- function(dt) {"
"0","  dt <- dt[, 9:109]"
"0","  tt <- t(dt)"
"0","  mat <- matrix(0, ncol = 5, nrow = dim(dt)[2])"
"0","  "
"0","  nivoi <- levels(as.factor(tt))"
"0","  "
"0","  colnames(mat) <- nivoi"
"0","  rownames(mat) <- colnames(dt)"
"0","  "
"0","  for (i in 1:nrow(tt)) {"
"0","    for (level in nivoi) {"
"0","      mat[i, level] <- summary(as.factor(tt[i, ]))[level]"
"0","    }"
"0","  }"
"0","  "
"0","  mat[is.na(mat)] <- 0"
"0","  return(mat)"
"0","}"
"0",""
"0","# Process and combine teacher data here (similar to student section)"
