Skip to content

Commit

Permalink
Add encyclopedists.R
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgallou committed May 8, 2024
1 parent 553aac6 commit aa59615
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
^codecov\.yml$
^cran-comments\.md$
^CRAN-SUBMISSION$
^data-raw$
44 changes: 44 additions & 0 deletions data-raw/encyclopedists.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
make_emails <- function(x) {
out <- gsub(".+\\b(\\w+)$", "\\1", x, perl = TRUE)
out <- tolower(out)
paste0(out, "@encyclopediste.fr")
}

encyclopedists <- tibble::tibble(
given_name = c("Denis", "Jean-Jacques", "François-Marie", "Jean"),
family_name = c("Diderot", "Rousseau", "Arouet", "Le Rond d'Alembert"),
email = make_emails(family_name),
phone = c("+1234", NA, NA, NA),
orcid = c(paste0("0000-0000-0000-000", 1:2), NA, "0000-0000-0000-0003"),
supervision = c(1, NA, NA, 1),
writing = 1,
note = c(
"born in 1713 in Langres",
NA,
"also known as Voltaire",
"born in 1717 in Paris"
),
affiliation_1 = c(
"Université de Paris",
rep("Lycée Louis-le-Grand", 2L),
"Université de Paris"
),
affiliation_2 = c(NA, NA, NA, "Collège des Quatre-Nations"),
)

encyclopedists_fr <- encyclopedists |>
dplyr::rename(
prénom = given_name,
nom = family_name,
courriel = email,
téléphone = phone,
rédaction = writing
) |>
dplyr::mutate(note = c(
"né en 1713 à Langres",
NA,
"dit Voltaire",
"né en 1717 à Paris"
))

usethis::use_data(encyclopedists, encyclopedists_fr, overwrite = TRUE)

0 comments on commit aa59615

Please sign in to comment.