<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;">Luciane,</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">Já tentou fazer algo como</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="background-color: transparent;"><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">dados1 <- le.pesquisa(dicionario = dicpes2005, pathname.in = caminho.microdados, </font></div><div style="background-color: transparent;"><font size="2"
 style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">                      codigos = c("UF","V0102","V0103","V0301","V0302","V8005",</font></div><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">                                  "V0401","V0402","V0403","V0404","V4703","V4704",</font></div><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">                                  "V4705","V4707","V4718","V4729"), </font></div><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace,
 sans-serif;">                      quant = 408148) </font></div><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;"><br></font></div><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;"><br></font></div><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">names(dados1) <- c("UF","NCONTR","NSERIE","NORDEM","SEXO","IDADE","CONDDOM","CONDFAM",</font></div><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">                   "NFAM","RACA_COR","ANOSEST","CONDATV","CONDOCP","HTRAB","RENDTRAB",</font></div><div
 style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">                   "PESOP")</font></div><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;"><br></font></div><div style="background-color: transparent;"><font size="2" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">save(dados1, file = "dados1.RData")</font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;"><font size="2"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;"><font size="2"><br></font></div><div style="background-color: transparent; color: rgb(0,
 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;"><font size="2">??</font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;"><font size="2"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;"><font size="2">Att.,</font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;"><font size="2">Rubem</font></div></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial">
 <b><span style="font-weight:bold;">De:</span></b> Luciane Maria Pilotto <lutipilotto@yahoo.com.br><br> <b><span style="font-weight: bold;">Para:</span></b> "r-br@listas.c3sl.ufpr.br" <r-br@listas.c3sl.ufpr.br> <br> <b><span style="font-weight: bold;">Enviadas:</span></b> Quinta-feira, 18 de Abril de 2013 22:49<br> <b><span style="font-weight: bold;">Assunto:</span></b> Re: [R-br] Pacote IBGEPesq e dicionarioIBGE<br> </font> </div> <div class="y_msg_container"><br><div id="yiv1702014978"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><span>Olá pessoal, </span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style:
 normal;"><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>ainda estou tentando entender os pacotes do IBGE! Roney, obrigada pela dica do SAS, mas gostaria de utilizar a função le.pesquisa do pacote do IBGEPesq. Como havia conseguido fazer o exemplo com os dados de 2005, já preparei um script organizando as variáveis que vou precisar. Se conseguir usar esta função já tenho praticamente todos os scripts
 prontos.</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Estou instalando a </span><span style="background-color:transparent;">library(IBGEPesq) e uso </span><span style="background-color:transparent;">data(dicPNAD2005) para abrir o dicionário da PNAD2005. Porém, esta não está funcionando para outros anos da PNAD, alguém sabe como fazer?</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color:transparent;"><br></span></div><div style="font-family: 'times new roman', 'new york', times,
 serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color:transparent;">Se instalo a library(dicionariosIBGE), funciona </span>data(dicPNAD2005), mas não aceita os nomes na função:</div><div><div style="background-color:transparent;">dados1 <- le.pesquisa (dicionario=dicpes2005, pathname.in=caminho.microdados, pathname.out="dados1.Rdata", </div><div style="background-color:transparent;">codigos=c("UF","V0102","V0103","V0301","V0302","V8005","V0401","V0402","V0403","V0404","V4703","V4704","V4705","V4707",</div><div><span style="background-color:transparent;">"V4718","V4729"),</span><span style="background-color:rgb(255, 0, 0);">nomes=</span>c("UF","NCONTR","NSERIE","NORDEM","SEXO","IDADE","CONDDOM","CONDFAM",</div><div style="background-color:transparent;">"NFAM","RACA_COR","ANOSEST","CONDATV","CONDOCP","HTRAB","RENDTRAB","PESOP"), quant=408148) </div><div
 style="background-color:transparent;">#  unused argument(s) (nomes = nomes, quant = nreg)<br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;">Att.,</div></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> </div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; margin-right: 0px;" dir="ltr" align="left"><font size="2"><font face="bookman old style, new york, times, serif"><font color="#5b5b5b"><b>Luciane Maria Pilotto<br></b></font></font></font></div>  <div style="font-family:'times new
 roman', 'new york', times, serif;font-size:12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">De:</span></b> Roney Fraga Souza <roneyfraga@gmail.com><br> <b><span style="font-weight:bold;">Para:</span></b> r-br@listas.c3sl.ufpr.br <br> <b><span style="font-weight:bold;">Enviadas:</span></b> Quarta-feira, 17 de Abril de 2013 13:30<br> <b><span style="font-weight:bold;">Assunto:</span></b> Re: [R-br] Pacote IBGEPesq e dicionarioIBGE<br> </font> </div> <div class="yiv1702014978y_msg_container"><br>Olá Luciane,<br><br>A vantagem de utilizar o pacote 'SAScii' é o fato dele importar os dados com o dicionário do SAS.<br><br>Att<br>Roney<br><br>## ----------------------------------------<br># instalando o pacote 'SAScii' elaborado por Anthony Joseph Damico<br>install.packages('SAScii')<br><br># carregando o
 pacote<br>library(SAScii)<br><br># é necessário eliminar os comentários do dicionário, os /* … */, para realizar a leitura correta<br># lendo o dicionário da PNAD 2011 pessoas<br>parse.SAScii( "2011_DOM_input.sas")<br><br># lendo o arquivo txt<br>dom2011  <- read.SAScii('2011_DOM.TXT', '2011_DOM_input.sas', beginline=11, buffersize=1000)<br><br>## ----------------------------------------<br># a função read.SAScii.sqlite() é muito útil para carregar os dados direto para SQLite<br>source_url( "<a rel="nofollow" target="_blank" href="https://raw.github.com/ajdamico/usgsd/master/SQLite/read.SAScii.sqlite.R">https://raw.github.com/ajdamico/usgsd/master/SQLite/read.SAScii.sqlite.R</a>" )<br><br>drv <- dbDriver("SQLite")<br>con <- dbConnect(drv, dbname='pnad')<br><br># transformar um arquivo do IBGE direto em uma base SQLite<br>read.SAScii.sqlite(fn = "2011_PES.TXT", sas_ri = "2011_PES_input.sas", tl = TRUE, tablename = "pes2011", db =
 con)<br>_______________________________________________<br>R-br mailing list<br><a rel="nofollow" ymailto="mailto:R-br@listas.c3sl.ufpr.br" target="_blank" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br><a rel="nofollow" target="_blank" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>Leia o guia de postagem (<a rel="nofollow" target="_blank" href="http://www.leg.ufpr.br/r-br-guia">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br><br></div> </div> </div>  </div></div></div><br>_______________________________________________<br>R-br mailing list<br><a ymailto="mailto:R-br@listas.c3sl.ufpr.br" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br><a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>Leia o guia
 de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br><br></div> </div> </div>  </div></body></html>