Skip to content

Commit

Permalink
create .Rd files with roxygen2
Browse files Browse the repository at this point in the history
  • Loading branch information
jlopezper committed May 6, 2018
1 parent 003fcc4 commit ccacd84
Show file tree
Hide file tree
Showing 17 changed files with 421 additions and 160 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Expand Up @@ -4,7 +4,7 @@ Title: Utilities for Official Spanish Microdata
Version: 0.8.11
Date: 2017-04-27
Encoding: UTF-8
Authors@R:c( person("Carlos J.", "Gil Bellosta", email="cgb@datanalytics.com", role=c('aut', 'cre')),
Authors@R: c( person("Carlos J.", "Gil Bellosta", email="cgb@datanalytics.com", role=c('aut', 'cre')),
person("Carlos", "Neira", email = "cneirac@gmail.com", role="ctb"),
person("Diego", "Paniagua Sánchez", email = "dpansan@gmail.com", role="ctb"),
person("Fiorella", "Mori Peláez", email = "fiorella.mori.pelaez@gmail.com", role="ctb"),
Expand All @@ -15,3 +15,4 @@ Depends: readr
License: GPL-3
LazyLoad: yes
LazyData: yes
RoxygenNote: 6.0.1
24 changes: 24 additions & 0 deletions R/censo2010.R
@@ -1,3 +1,27 @@
#' Download data from 2010 Spanish Census from INE
#'
#' This function downloads the data from 2010 (or later) Spanish Census using the information provided by the Spanish Statistical Office (INE).
#'
#' @param file Character string with the name of the microdata file provided by the INE on the
#' \href{http://www.ine.es/censos2011_datos/cen11_datos_microdatos.htm}{Census} section. It allows either a path to a file,
#' or literal data (single string or raw vector). It also allows compressed files in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} format.
#'
#' @return \code{\link[tibble]{tibble}} with all avaliable requested data where each row corresponds to an anonymised citizen.
#' @details This function reads microdata from the 2010 census in Spain. It was originally built using the metadata for 2010 file but it may be used for later years.
#'
#' Note that the loaded object will be of considerable size and may require a computer from 8 GB of RAM. In order to avoid this kind of computational issues, you can also download the splitted version provided by the INE.
#' @author Carlos Neira and Carlos J. Gil Bellosta
#' @note The \code{file} parameter allows any flat file with fixed width.
#' @references http://www.ine.es/prodyser/microdatos.htm
#' @examples
#' # Downloaded \href{ftp://www.ine.es/temas/censopv/cen11/Microdatos_personas_nacional.zip}{data}
#' \dontrun{
#' raw <- censo2010("MicrodatosCP_NV_per_nacional_3VAR.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.


###################################################################
# cjgb
# 20140428
Expand Down
23 changes: 23 additions & 0 deletions R/defun2011.R
@@ -1,3 +1,26 @@
#' Download data for deaths from INE
#'
#' This function downloads deaths statistcs from the Spanish Statistical Office (INE).
#'
#' @param file Character string with the name of the microdata file provided by the INE on the
#' \href{http://www.ine.es/dyngs/INEbase/es/operacion.htm?c=Estadistica_C&cid=1254736177008&menu=resultados&secc=1254736195450&idp=1254735573002}{Deaths} section. It allows either a path to a file
#' or literal data (single string or raw vector). It also allows compressed files in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} format.
#'
#' @return \code{\link[tibble]{tibble}} with all avaliable requested data where each row corresponds to an anonymised citizen.
#' @details This function reads deaths microdata in Spain.
#'
#' It was originally built using the metadata for the 2011 file and may work with microdata files for other yearly submissions. Previous files have a different, non compatible, format.
#' @author Carlos J. Gil Bellosta
#' @note The \code{file} parameter allows any flat file with fixed width.
#' @references http://www.ine.es/prodyser/microdatos.htm
#' @examples
#' \dontrun{
#' raw <- defun2011("datos_2016.zip") # It will be automatically uncompressed.
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.


###################################################################
# cjgb
# 20120811
Expand Down
22 changes: 22 additions & 0 deletions R/ees2010.R
@@ -1,3 +1,25 @@
#' Download data from the Encuesta de Estructura Salarial (EES)
#'
#' This function downloads data from the Spanish Survey of Salary Structure using the information provided by the Spanish Statistical Office (INE).
#'
#' @param file Character string with the name of the microdata file provided by the INE on the
#' \href{http://www.ine.es/dyngs/INEbase/es/operacion.htm?c=Estadistica_C&cid=1254736177025&menu=resultados&secc=1254736195110&idp=1254735976596}{EES} section. It allows either a path to a file,
#' or literal data (single string or raw vector). It also allows compressed files in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} format.
#'
#' @return \code{\link[tibble]{tibble}} with all avaliable requested data where each row corresponds to an anonymised citizen.
#' @details This function reads microdata from the Survey of Salary Structure in Spain. It was originally built using the metadata for 2010 file but it may be used for later years. Previous files have a different, non compatible, format.
#'
#' @author Carlos J. Gil Bellosta, with major contributions from José Luis Cañadas Reche
#' @note The \code{file} parameter allows any flat file with fixed width.
#' @references http://www.ine.es/prodyser/microdatos.htm
#' @examples
#' \dontrun{
#' raw <- ees2010("datos_2014.zip") # It will be automatically uncompressed.
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.


###################################################################
# cjgb
# 20120305
Expand Down
22 changes: 22 additions & 0 deletions R/epa2005.R
@@ -1,3 +1,25 @@
#' Download data from the Encuesta de Población Activa (EPA)
#'
#' This function downloads the data from the Spanish Active Population Survey using the information provided by the Spanish Statistical Office (INE).
#'
#' @param file Character string with the name of the microdata file provided by the INE on the
#' \href{http://www.ine.es/dyngs/INEbase/es/operacion.htm?c=Estadistica_C&cid=1254736176918&menu=resultados&secc=1254736030639&idp=1254735976595}{EPA} section. It allows either a path to a file,
#' or literal data (single string or raw vector). It also allows compressed files in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} format.
#'
#' @return \code{\link[tibble]{tibble}} with all avaliable requested data where each row corresponds to an anonymised citizen.
#' @details This function reads microdata from the quarterly Active Population Survey in Spain. It was originally built using the metadata for 2005 file but it may be used for later years. Previous files have a different, non compatible, format.
#'
#' @author Carlos J. Gil Bellosta
#' @note The \code{file} parameter allows any flat file with fixed width.
#' @references http://www.ine.es/prodyser/microdatos.htm
#' @examples
#' \dontrun{
#' raw <- epa2005("EPA4T017")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.


###################################################################
# cjgb
# 20120305
Expand Down
22 changes: 22 additions & 0 deletions R/epf.2011.gastos.R
@@ -1,3 +1,25 @@
#' Download data from the Encuesta de Presupuestos Familiares (EPF)
#'
#' This function downloads data from the Spanish Survey of Family Budgets \strong{(Expenditure approach)} using the information provided by the Spanish Statistical Office (INE).
#'
#' @param file Character string with the name of the microdata file provided by the INE on the
#' \href{http://www.ine.es/dyngs/INEbase/es/operacion.htm?c=Estadistica_C&cid=1254736176806&menu=resultados&secc=1254736195147&idp=1254735976608}{EPF} section. It allows either a path to a file,
#' or literal data (single string or raw vector). It also allows compressed files in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} format.
#'
#' @return \code{\link[tibble]{tibble}} with all avaliable requested data where each row corresponds to an anonymised citizen.
#' @details This function reads microdata from the expenditure approach of the Survey of Family Budgets in Spain. It was originally built using the metadata for 2011 file but it may be used for later years. Previous files have a different, non compatible, format.
#'
#' @author Diego Paniagua Sánchez and Carlos J. Gil Bellosta
#' @note The \code{file} parameter allows any flat file with fixed width.
#' @references http://www.ine.es/prodyser/microdatos.htm
#' @examples
#' \dontrun{
#' raw <- epf.2011.gastos("sample_gastos_a2011.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.


###################################################################
# Diego Paniagua Sánchez
# 20150906
Expand Down
22 changes: 22 additions & 0 deletions R/epf.2011.hogares.R
@@ -1,3 +1,25 @@
#' Download data from the Encuesta de Presupuestos Familiares (EPF)
#'
#' This function downloads data from the Spanish Survey of Family Budgets \strong{(Homes approach)} using the information provided by the Spanish Statistical Office (INE).
#'
#' @param file Character string with the name of the microdata file provided by the INE on the
#' \href{http://www.ine.es/dyngs/INEbase/es/operacion.htm?c=Estadistica_C&cid=1254736176806&menu=resultados&secc=1254736195147&idp=1254735976608}{EPF} section. It allows either a path to a file,
#' or literal data (single string or raw vector). It also allows compressed files in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} format.
#'
#' @return \code{\link[tibble]{tibble}} with all avaliable requested data where each row corresponds to an anonymised citizen.
#' @details This function reads microdata from the homes approach of the Survey of Family Budgets in Spain. It was originally built using the metadata for 2011 file but it may be used for later years. Previous files have a different, non compatible, format.
#'
#' @author Diego Paniagua Sánchez and Carlos J. Gil Bellosta
#' @note The \code{file} parameter allows any flat file with fixed width.
#' @references http://www.ine.es/prodyser/microdatos.htm
#' @examples
#' \dontrun{
#' raw <- epf.2011.gastos("sample_hogares_a2011.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.


###################################################################
# Diego Paniagua Sánchez
# 20150906
Expand Down
23 changes: 23 additions & 0 deletions R/epf.2011.miembros.R
@@ -1,3 +1,26 @@
#' Download data from the Encuesta de Presupuestos Familiares (EPF)
#'
#' This function downloads data from the Spanish Survey of Family Budgets \strong{(Members approach)} using the information provided by the Spanish Statistical Office (INE).
#'
#' @param file Character string with the name of the microdata file provided by the INE on the
#' \href{http://www.ine.es/dyngs/INEbase/es/operacion.htm?c=Estadistica_C&cid=1254736176806&menu=resultados&secc=1254736195147&idp=1254735976608}{EPF} section. It allows either a path to a file,
#' or literal data (single string or raw vector). It also allows compressed files in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} format.
#'
#' @return \code{\link[tibble]{tibble}} with all avaliable requested data where each row corresponds to an anonymised citizen.
#' @details This function reads microdata from the members approach of the Survey of Family Budgets in Spain. It was originally built using the metadata for 2011 file but it may be used for later years. Previous files have a different, non compatible, format.
#'
#' @author Diego Paniagua Sánchez and Carlos J. Gil Bellosta
#' @note The \code{file} parameter allows any flat file with fixed width.
#' @references http://www.ine.es/prodyser/microdatos.htm
#' @examples
#' \dontrun{
#' raw <- epf.2011.gastos("sample_miembros_a2011.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.



###################################################################
# Diego Paniagua Sánchez
# 20150906
Expand Down
22 changes: 22 additions & 0 deletions R/padron2016.R
@@ -1,3 +1,25 @@
#' Download data from the "Padrón"
#'
#' This function downloads data from the Spanish "padrón" using the information provided by the Spanish Statistical Office (INE).
#'
#' @param file Character string with the name of the microdata file provided by the INE on the
#' \href{http://www.ine.es/dyngs/INEbase/es/operacion.htm?c=Estadistica_C&cid=1254736177012&menu=resultados&secc=1254736195462&idp=1254734710990}{Padrón} section. It allows either a path to a file,
#' or literal data (single string or raw vector). It also allows compressed files in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} format.
#'
#' @return \code{\link[tibble]{tibble}} with all avaliable requested data where each row corresponds to an anonymised citizen.
#' @details This function reads microdata from the members approach of the "Padrón" in Spain. It was originally built using the metadata for 2016 file but it may be used for later years. Previous files have a different, non compatible, format.
#'
#' @author Carlos J. Gil Bellosta; metadata provided by Fiorella Mori.
#' @note The \code{file} parameter allows any flat file with fixed width.
#' @references http://www.ine.es/prodyser/microdatos.htm
#' @examples
#' \dontrun{
#' raw <- epf.2011.gastos("sample_padron_2016.txt")
#' summary(raw)
#' }
#' @seealso \code{\link[read_fwf]{readr}} to read fixed width files.


###################################################################
# cjgb
# 20170427
Expand Down
55 changes: 31 additions & 24 deletions man/censo2010.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 26 additions & 27 deletions man/defun2011.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ccacd84

Please sign in to comment.