"0","overall <- read_excel(""./bonus/excel/overall2.xlsx"")"
"0",""
"0","# Calculate total evaluations"
"0","overall$total_evaluations <- (overall$Students + overall$Teachers + overall$Companies) / 3"
"0",""
"0","# Sort and classify into categories"
"0","overall_sorted <- overall[order(overall$total_evaluations, decreasing = TRUE), ]"
"0","n_subjects <- nrow(overall_sorted)"
"0","n_A <- ceiling(n_subjects * 0.3)"
"0","total_evaluations_A <- overall_sorted$total_evaluations[n_A]"
"0",""
"0","overall_sorted$category <- ifelse(overall_sorted$total_evaluations >= total_evaluations_A, ""A"","
"0","                                  ifelse(overall_sorted$total_evaluations > total_evaluations_A * 0.7, ""B"", ""C""))"
"0",""
"0","# Save results"
"0","write.csv(overall_sorted, ""overall_sorted.csv"")"
"0","View(overall_sorted)"
