Skip to content

Commit 2d3d4eb

Browse files
committed
Infer Shiny app shows only best score for each student
1 parent 3784f84 commit 2d3d4eb

File tree

1 file changed

+2
-0
lines changed
  • inst/shiny/A10Ca_infer

1 file changed

+2
-0
lines changed

inst/shiny/A10Ca_infer/app.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ server <- function(input, output) {
184184
ranking <- ranking[order(-ranking$score, as.numeric(ranking$date)), ]
185185
ranking$date <- as.POSIXct(ranking$date, origin = "1960-01-01")
186186
ranking$date <- format(ranking$date, "%Y-%m-%d %H:%M:%S")
187+
# Keep only best score for each student or team
188+
ranking <- ranking[!duplicated(ranking$project), ]
187189
}
188190
message("Date reworked")
189191
# Add a column with medals for the three first results

0 commit comments

Comments
 (0)