covid_labeller {COVIDIBGE}R Documentation

Label categorical variables from PNAD COVID19 microdata


This function labels categorical variables from PNAD COVID19 microdata.


covid_labeller(data_covid, dictionary.file)



A tibble of PNAD COVID19 microdata read with read_covid function.


The dictionary file for selected survey available on official website: (select a dictionary xls file) -


A tibble with the data provided from PNAD COVID19 survey and its categorical variables as factors with related labels.


For more information, visit the survey official website <> and consult the other functions of this package, described below.

See Also

get_covid for downloading, labelling, deflating and creating survey design object for PNAD COVID19 microdata.
read_covid for reading PNAD COVID19 microdata.
covid_deflator for adding deflator variables to PNAD COVID19 microdata.
covid_design for creating PNAD COVID19 survey design object.
covid_example for getting the path of the PNAD COVID19 example files.


# Using data read from disk
data_path <- covid_example(path="exampledata.csv")
dictionary.path <- covid_example(path="dictionaryexample.xls")
covid.df <- read_covid(microdata=data_path, vars=c("C001","C002"))
covid.df <- covid_labeller(data_covid=covid.df, dictionary.file=dictionary.path)

# Downloading data
covid.df2 <- get_covid(year=2020, month=5, vars=c("C001","C002"),
                       labels=FALSE, deflator=FALSE, design=FALSE, savedir=tempdir())
dictionary.path2 <- covid_example(path="dictionaryexample.xls")
covid.df2 <- covid_labeller(data_covid=covid.df2, dictionary.file=dictionary.path2)

[Package COVIDIBGE version 0.1.4 Index]