| tableau_descriptif | R Documentation |
Produit un tableau de statistiques descriptives pondere, formate selon les conventions des INS africains. Exportable en Word (flextable) ou Excel (openxlsx2).
tableau_descriptif(
data,
vars,
poids = NULL,
par = NULL,
stats = c("n", "moyenne", "mediane", "ecart_type", "min", "max", "ic"),
format = c("tibble", "flextable", "excel"),
chemin = NULL,
titre = NULL,
source = NULL
)
data |
data.frame, tibble ou objet |
vars |
character – Variables numeriques a analyser |
poids |
character ou NULL – Variable de ponderation. Defaut : NULL |
par |
character ou NULL – Variable de ventilation (groupe). Defaut : NULL |
stats |
character – Statistiques parmi :
|
format |
character – |
chemin |
character ou NULL – Chemin Excel. Defaut : NULL |
titre |
character ou NULL – Titre du tableau. Defaut : NULL |
source |
character ou NULL – Note source. Defaut : NULL |
Tibble, flextable ou chemin fichier Excel
set.seed(42)
donnees <- data.frame(
age = sample(18:65, 200, replace = TRUE),
revenu = rexp(200, rate = 1/250000),
poids = runif(200, 0.8, 1.3),
milieu = sample(c("urbain", "rural"), 200, TRUE)
)
tableau_descriptif(donnees, vars = c("age", "revenu"), poids = "poids")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.