From 73ad072da2407678c9186e26bd33e13cc1a65c04 Mon Sep 17 00:00:00 2001 From: Laurent Modolo <laurent.modolo@ens-lyon.fr> Date: Tue, 7 Sep 2021 13:48:28 +0200 Subject: [PATCH] add forms folder, with mail template and select_trainee.R script for futur sessions --- forms/1_mail.txt | 45 ++++++++++++++++++++++++++++++++++++++++++ forms/select_trainee.R | 23 +++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 forms/1_mail.txt create mode 100644 forms/select_trainee.R diff --git a/forms/1_mail.txt b/forms/1_mail.txt new file mode 100644 index 0000000..869a7f7 --- /dev/null +++ b/forms/1_mail.txt @@ -0,0 +1,45 @@ +Dear all, + +You are registered for the first session of the R formation: R the basis organized by the CAN. + +This formation will be given once a week for 10 consecutive weeks on Mondays from 11h to 12h30. +If you are not available anymore please let me know by replying to this email. + +The first session will be Monday 20/09 in the Salle de TP du CBP. +All the support will be in English but the course itself will be in French. + +You will receive another email will all the necessary technical information during the week. + +Best, + +Dear all, + +=== + +You are registered for the first session of the R formation: R the basis organized by the CAN. + +This formation will be given once a week for 10 consecutive weeks on Tuesdays from 11h to 12h30. +If you are not available anymore please let me know by replying to this email. + +The first session will be Tuesday 14/09 in the Salle de TP du CBP. +All the support will be in English but the course itself will be in French. + +You will receive another email will all the necessary technical information during the week. + +Best, + +=== + +Dear all, + +You are registered for the first session of the R formation: R the basis organized by the CAN. + +This formation will be given once a week for 10 consecutive weeks on Fridays from 11h to 12h30. +If you are not available anymore please let me know by replying to this email. + +The first session will be Friday 17/09 in the Salle de TP du CBP. +All the support will be in English but the course itself will be in French. + +You will receive another email will all the necessary technical information during the week. + +Best, diff --git a/forms/select_trainee.R b/forms/select_trainee.R new file mode 100644 index 0000000..1a373cf --- /dev/null +++ b/forms/select_trainee.R @@ -0,0 +1,23 @@ +library(tidyverse) +banned <- c( + "marine.villard01@chu-lyon.fr" +) + +days <- c("monday_11h_12h30", "tuesday_11h_12h30", "friday_11h_12h30") +for( day in days) { + read_tsv("trainee.tsv", skip = 2) %>% + janitor::clean_names() %>% + filter(!(email %in% banned)) %>% + select(c( + sequentiel, email, lab, + monday_11h_12h30, tuesday_11h_12h30, friday_11h_12h30, + comments)) %>% + filter(!duplicated(email)) %>% + filter( + .[[day]] %in% "first choice" + ) %>% + select(c( + email)) %>% + write_csv(str_c(day, ".csv")) +} + -- GitLab