@@ -16,12 +16,12 @@ library(flipdownr)
16
16
title <- " Challenge analyses multivariées"
17
17
# Note: define real deadline in environment variables in RStudio Connect
18
18
deadline <- Sys.getenv(" CHALLENGE_DEADLINE" ,
19
- unset = " 2024 -02-23 00:00:00" )
19
+ unset = " 2025 -02-21 00:00:00" )
20
20
21
21
# Read data from the SQLite database
22
22
dir <- " /data1/B07_challenge"
23
23
if (! file.exists(dir ))
24
- dir <- " ~/Desktop/ B07_challenge" # Alternate dir for local tests
24
+ dir <- " ~/B07_challenge" # Alternate dir for local tests
25
25
database <- file.path(dir , " multi.sqlite" )
26
26
table <- " multi"
27
27
@@ -44,7 +44,7 @@ score_multi <- function(x) {
44
44
# if (any(x < 0) | any(x > 1))
45
45
# return(structure(NA,
46
46
# message = paste("Le r\u00e9sultat doit contenir des valeurs entre 0 et 1 uniquement. Corrigez et resoumettez !")))
47
- score <- as.numeric(sum(x )) # Score is the sum of all the 20 individual scores for the different charts
47
+ score <- as.numeric(sum(x )) # Score is the sum of all the 10 individual scores for the different charts
48
48
structure(score ,
49
49
message = paste0(" Votre proposition est accept\u 00e9e. Son score est de " ,
50
50
round(score , 1 ), " ." ))
@@ -184,6 +184,8 @@ server <- function(input, output) {
184
184
ranking <- ranking [order(- ranking $ score , as.numeric(ranking $ date )), ]
185
185
ranking $ date <- as.POSIXct(ranking $ date , origin = " 1960-01-01" )
186
186
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 ), ]
187
189
}
188
190
message(" Date reworked" )
189
191
# Add a column with medals for the three first results
0 commit comments