| tab_croisee | R Documentation |
Produit un tableau croisé (ou tableau de fréquences simple) avec prise en compte optionnelle de la pondération et du plan de sondage complexe. Résultat formaté pour publication directe.
tab_croisee(
data,
var_ligne,
var_col = NULL,
var_poids = NULL,
ic = TRUE,
pourcentage = c("colonne", "ligne", "total"),
format_sortie = c("flextable", "tibble")
)
data |
data.frame, tibble ou objet |
var_ligne |
character — Variable en ligne |
var_col |
character ou NULL — Variable en colonne. Si NULL, tableau de fréquences simple. Défaut : NULL. |
var_poids |
character ou NULL — Variable de pondération (ignorée si data est un svydesign). Défaut : NULL. |
ic |
logical — Calculer les IC à 95%. Défaut : TRUE. |
pourcentage |
character — Type : |
format_sortie |
character — |
Tibble ou flextable du tableau croisé.
## Not run:
donnees <- data.frame(
region = sample(c("Nord", "Sud", "Est"), 50, replace = TRUE),
sexe = sample(c("H", "F"), 50, replace = TRUE)
)
tab_croisee(donnees, "region", "sexe")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.