Learn R Programming

POFIBGE (version 0.1.6)

read_pof: Read POF microdata

Description

This function reads POF microdata.

Usage

read_pof(microdata, input_txt, vars = NULL)

Arguments

microdata

A text file containing microdata from POF survey, available on official website: (select a microdata file, according to the appropriated select the dictionary and input zip file, according to the appropriated year, microdata folder and then, inside, data) - https://ftp.ibge.gov.br/Orcamentos_Familiares/.

input_txt

A text file, related to the microdata, containing the input script for SAS, available on official website: (select the dictionary and input zip file, according to the appropriated select the dictionary and input zip file, according to the appropriated year, microdata folder and then, inside, documentation) - https://ftp.ibge.gov.br/Orcamentos_Familiares/.

vars

Vector of variable names to be kept for analysis. Default is to keep all variables.

Value

A tibble with selected variables of the microdata, including the necessary survey design ones.

See Also

get_pof for downloading, labeling, deflating and creating survey design object for POF microdata. pof_labeller for labeling categorical variables from POF microdata. pof_deflator for adding deflator variables to POF microdata. pof_design for creating POF survey design object. pof_example for getting the path of the POF toy example files.

Examples

Run this code
# NOT RUN {
input_path <- pof_example(path="input_example.txt")
data_path <- pof_example(path="exampledata.txt")
pof.df <- read_pof(microdata=data_path, input_txt=input_path, vars=c("V0407","V0408"))
# }

Run the code above in your browser using DataLab