Formats an estimate table (fa_estimate() or fa_indicator()) the
way it goes in a paper: one row per area with the estimate, its
confidence interval, the CV and the number of cases. Estimates with CV
above 15% (INEI "referencial") are marked with an asterisk and a note.
Uso
fa_table(
x,
digits = 1,
percent = TRUE,
format = c("data.frame", "markdown", "latex"),
caption = NULL
)Valor
A data frame, or a character vector with the lines of the
table (print it with cat(..., sep = "\\n")).
Ejemplos
x <- data.frame(name = c("Lima", "Ica"), estimate = c(.27, .06), se = c(.012, .009),
ci_low = c(.246, .042), ci_high = c(.294, .078), cv = c(4.5, 15.6),
n = c(5000, 900))
fa_table(x)
#> Area Estimate 95% CI CV (%) n
#> 1 Lima 27.0 24.6 - 29.4 4.5 5,000
#> 2 Ica 6.0* 4.2 - 7.8 15.6 900
cat(fa_table(x, format = "markdown"), sep = "\n")
#> | Area | Estimate | 95% CI | CV (%) | n |
#> |:--|--:|--:|--:|--:|
#> | Lima | 27.0 | 24.6 - 29.4 | 4.5 | 5,000 |
#> | Ica | 6.0* | 4.2 - 7.8 | 15.6 | 900 |
#>
#> * CV above 15% or fewer than 30 cases: a reference only (INEI 'referencial').
