Marcos Júnio Ribeiro

Microdados

November 07, 2021 | 1 Minute Read

Microdados

Description

In this R package I provide a easy and fast way to get PNAD using R. With this package you have access to the PNADs (pessoas and domicilios) from 1992 to 2015, except for 1994, 2000 and 2010, years in which the PNAD was not carried out. Enjoy !

Source Data Function Period Sub dataset
IBGE PNAD load_pnad 1992 to 2015 pessoas e domicilios

Installation

install.packages("devtools")
devtools::install_github("mj-ribeiro/Microdados")
library('Microdados')

If you receive this error: “system error 267, O nome do diretório é inválido”, or something similar try the following code:

install.packages("remotes")
Sys.setenv(R_REMOTES_STANDALONE="true")
remotes::install_github("mj-ribeiro/Microdados" )
library('Microdados')

Examples

load_pnad(2001, 'pessoas')       # load PNAD pessoas from 2001
load_pnad(1996, 'domicilios')    # load PNAD domicilios from 1996

To contribute acess my GitHub. My R course can be view in my channel on YouTube .