pnadc_labeller {PNADcIBGE} | R Documentation |
Label categorical variables from PNADC microdata
Description
This function labels categorical variables from PNADC microdata.
Usage
pnadc_labeller(data_pnadc, dictionary.file)
Arguments
data_pnadc |
A tibble of PNADC microdata read with |
dictionary.file |
The dictionary file for selected survey available on official website: |
Value
A tibble with the data provided from PNADC survey and its categorical variables as factors with related labels.
Note
For more information, visit the survey official website <https://www.ibge.gov.br/estatisticas/sociais/trabalho/9171-pesquisa-nacional-por-amostra-de-domicilios-continua-mensal.html?=&t=o-que-e> and consult the other functions of this package, described below.
See Also
get_pnadc for downloading, labeling, deflating and creating survey design object for PNADC microdata.
read_pnadc for reading PNADC microdata.
pnadc_deflator for adding deflator variables to PNADC microdata.
pnadc_design for creating PNADC survey design object.
pnadc_example for getting the path of the quarter PNADC toy example files.
Examples
# Using data read from disk
input_path <- pnadc_example(path="input_example.txt")
data_path <- pnadc_example(path="exampledata.txt")
dictionary.path <- pnadc_example(path="dictionaryexample.xls")
pnadc.df <- read_pnadc(microdata=data_path, input_txt=input_path, vars=c("VD4001","VD4002"))
pnadc.df <- pnadc_labeller(data_pnadc=pnadc.df, dictionary.file=dictionary.path)
# Downloading data
pnadc.df2 <- get_pnadc(year=2017, quarter=4, selected=FALSE, vars=c("VD4001","VD4002"),
defyear=2017, defperiod=4, labels=FALSE, deflator=FALSE, design=FALSE,
reload=TRUE, curlopts=list(), savedir=tempdir())
dictionary.path2 <- pnadc_example(path="dictionaryexample.xls")
pnadc.df2 <- pnadc_labeller(data_pnadc=pnadc.df2, dictionary.file=dictionary.path2)