From e4c279db80c298ac8ca2f29846fcf4b7a31dd3a0 Mon Sep 17 00:00:00 2001 From: Maxime Wack Date: Sat, 8 Aug 2020 00:02:05 +0200 Subject: [PATCH] =?UTF-8?q?Force=20d=C3=A9sir=20de=20chirurgie=20as=20char?= =?UTF-8?q?acter=20in=20both=20sources?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- feed_db.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/feed_db.R b/feed_db.R index 1636892..f60a396 100644 --- a/feed_db.R +++ b/feed_db.R @@ -36,6 +36,7 @@ db %>% select(Etat, Etudiant, `Vœu`, Rang, Subdivision, Discipline, `Désir (non officiel) en chirurgie générale`, timestamp) %>% collect(n = Inf) %>% group_by(Etudiant) %>% + mutate_at(vars(`Désir (non officiel) en chirurgie générale`), as.character) %>% filter(timestamp == max(timestamp)) -> current @@ -87,6 +88,7 @@ listing # Ajout des différences avec timestamp listing %>% + mutate(`Désir (non officiel) en chirurgie générale` = `Désir (non officiel) en chirurgie générale` %>% as.character) %>% anti_join(current, by = c("Etat", "Etudiant", "Vœu", "Rang", "Subdivision", "Discipline", "Désir (non officiel) en chirurgie générale")) %>% dbWriteTable(conn = db, value = ., name = "trajectoires", append = T)