| tableau_croise_ins | R Documentation |
Produit un tableau de contingence pondere avec marges, pourcentages et test du chi-deux.
tableau_croise_ins(
data,
ligne,
colonne,
poids = NULL,
type_pct = c("colonne", "ligne", "total"),
marges = TRUE,
chi2 = TRUE,
format = c("tibble", "flextable", "excel"),
chemin = NULL,
titre = NULL
)
data |
data.frame, tibble ou |
ligne |
character – Variable en ligne |
colonne |
character – Variable en colonne |
poids |
character ou NULL – Variable de ponderation. Defaut : NULL |
type_pct |
character – |
marges |
logical – Afficher les totaux. Defaut : TRUE |
chi2 |
logical – Calculer le test du chi-deux. Defaut : TRUE |
format |
character – |
chemin |
character ou NULL – Chemin Excel. Defaut : NULL |
titre |
character ou NULL – Titre. Defaut : NULL |
Tibble, flextable ou chemin Excel
set.seed(42)
donnees <- data.frame(
region = sample(c("Nord", "Sud", "Est", "Ouest"), 300, TRUE),
milieu = sample(c("urbain", "rural"), 300, TRUE, prob = c(0.4, 0.6)),
poids = runif(300, 0.7, 1.4)
)
tableau_croise_ins(donnees, "region", "milieu", poids = "poids")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.