Skip to content

Commit 4446c40

Browse files
committed
Challenge: present only best score for student/team
1 parent b2fdea6 commit 4446c40

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

inst/shiny/C03Ca_ml_wine/app.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ server <- function(input, output) {
208208
ranking <- ranking[order(-ranking$score, as.numeric(ranking$date)), ]
209209
ranking$date <- as.POSIXct(ranking$date, origin = "1970-01-01")
210210
ranking$date <- format(ranking$date, "%Y-%m-%d %H:%M:%S")
211+
# Keep only best score for each student or team
212+
ranking <- ranking[!duplicated(ranking$project), ]
211213
}
212214
message("Date reworked")
213215
# Add a column with medals for the three first results

0 commit comments

Comments
 (0)