tabulate_results: Tabula resultados (_Tabulate results_)

Description Usage Arguments Details Value See Also Examples

View source: R/tabulate_results.R

Description

Función para tabular resultados de la elección (Function to tabulate election results)

Usage

1
tabulate_results(data, LaTeX = F)

Arguments

data

un tibble guardado como objeto en el enviroment luego de consultar get_election_data con parámetro level en provincia (A tibble saved as an object in the enviroment after querying get_election_data with provincia as level parameter).

LaTeX

parámetro para obtener código LaTeX de la tabla de salida. Ejemplo de uso en Overleaf (parameter to get LaTeX code in the ouptut table. Overleaf example usage).

Details

REQUISITOS:

1. El formato de data debe ser long para calcular resultados. Si data es wide se puede transformar con make_long (long format of data is required for getting results. If data is in wide format you can transform it with make_long)

2. data tiene que haber incorporando los nombres de las listas. Agreguelos con get_names (data must have party names. Add them with get_names).

3. data tiene que haber sido descargada con parámetro level = provincia con la función get_election_data (data must be level = provincia when downloading it with get_election_data).

Value

Tabulado con resultados agregados de la eleccion. Por defecto devuelve un tabulado de class "gt_tbl" "list". Si en cambio el parametro es LaTex = TRUE devuelve codigo de LaTex con class"character" (Table with aggregated election results. By default it returns a tab of class "gt_tbl" "list". If instead the parameter is set to LaTex = TRUE it returns LaTex code with class "character").

See Also

plot_results

Examples

1
2
3
4
5
6
7
8
9

polAr documentation built on Feb. 22, 2021, 5:07 p.m.