Learn R Programming

statAfrikR (version 0.2.1)

tableau_ipm: Tableau institutionnel IPM

Description

Genere un tableau flextable institutionnel (style INS/PARIS21) des resultats IPM, exportable en Word ou Excel.

Usage

tableau_ipm(
  res_ipm,
  pays = "Pays",
  annee = as.integer(format(Sys.Date(), "%Y")),
  chemin_word = NULL
)

Value

Un objet flextable (invisible si chemin_word fourni)

Arguments

res_ipm

saf_ipm -- Resultat de calcul_ipm() ou calcul_ipm_national()

pays

character -- Nom du pays. Defaut : "Pays"

annee

integer -- Annee de reference

chemin_word

character ou NULL -- Chemin Word (.docx). Si NULL, retourne l'objet flextable. Defaut : NULL

Examples

Run this code
set.seed(42)
n <- 200
menages <- data.frame(
  nutrition   = rbinom(n,1,0.35), electricite = rbinom(n,1,0.60),
  eau         = rbinom(n,1,0.40), poids = runif(n,0.8,1.3)
)
res <- calcul_ipm(menages, var_nutrition="nutrition",
  var_electricite="electricite", var_eau="eau", poids="poids")
tableau_ipm(res, pays="Centrafrique", annee=2026L)

Run the code above in your browser using DataLab