Learn R Programming

polAr (version 0.2.0.1)

tabulate_results: Tabula resultados (Tabulate results)

Description

Funci<U+00F3>n para tabular resultados de la elecci<U+00F3>n (Function to tabulate election results)

Usage

tabulate_results(data, LaTeX = F)

Arguments

data

un tibble guardado como objeto en el enviroment luego de consultar get_election_data con par<U+00E1>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<U+00E1>metro para obtener c<U+00F3>digo LaTeX de la tabla de salida. Ejemplo de uso en Overleaf (parameter to get LaTeX code in the ouptut table. Overleaf example usage).

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").

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<U+00E1>metro level = provincia con la funci<U+00F3>n get_election_data (data must be level = provincia when downloading it with get_election_data).

See Also

plot_results

Examples

Run this code
# NOT RUN {
 
 tucuman_dip_gral_2017
  
  x <- tucuman_dip_gral_2017 %>%
      get_names() %>% 
      tabulate_results(LaTeX = TRUE)
  
  cat(x)
  
# }

Run the code above in your browser using DataLab