Mise en place projet R

This commit is contained in:
2026-06-08 16:16:27 +02:00
commit 265e5f1db6
27 changed files with 12697 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#' Utilitaires transversaux
`%||%` <- function(a, b) if (is.null(a)) b else a
safe_numeric <- function(x) {
suppressWarnings(as.numeric(x))
}
validate_numeric <- function(x, name = 'values') {
if (is.null(x)) stop(sprintf("Champ '%s' manquant", name))
if (!is.numeric(x)) stop(sprintf("Champ '%s' doit être numérique", name))
invisible(TRUE)
}