Agregado_Mun_MIR: Download. Aggregated data at the municipal level obtained...

Description Usage Arguments Value Examples

View source: R/Leer_Datos.R

Description

This function serves to download the data in Excel format at the municipal level and creates a data.frame in your R environment with that information. Note: The fields returned are all of character type, so if you need to perform operations with them, you will have to convert the necessary fields to numeric.

Usage

1
Agregado_Mun_MIR(Ano, Mes, Tipo, Ruta, Borrar = TRUE)

Arguments

Ano

The election year in four-digit format (YYYY). Can be numeric or text.

Mes

The election month. It has to be of character format. For example "06", corresponding to June.

Tipo

The type of elections to which the data to be downloaded correspond: Congress (you must pass to the function the word "Congreso") or European (you must pass to the function the word "Europeas").

Ruta

It is the local path from your computer where the zip files from the Spanish Ministry of Home Office (MIR) will be dowloaded.

Borrar

It is a Boolean variable that indicates whether or not the downloaded files are deleted after creating the data.frame in R.

Value

Object of type 'tbl_df' with the data at municipal level.

Examples

1
c<-Agregado_Mun_MIR(1989,"06",Tipo = "Europeas","F:/")

Relectoral documentation built on July 2, 2020, 2:31 a.m.