<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div>Infelizmente o pacote FAOSTAT foi descontinuado. Veja a mensagem do autor:</div><div><br></div><div>NOTE: This package has been orphaned due to the current re-development of the FAOSTAT API and the fact that I no longer work for the organisation and has no access to the updates.<br></div><div><br></div><div>É melhor baixar a tabela inteira do site da FAO e sumarizar manualmente os dados no R - usar o pacote data.table é uma boa ideia para isso.</div><div><br></div><div class="ydp57d50074signature"><div style="font-size:13px;">Saudações,<div> -- Thiago V. dos Santos</div><div><br></div><div><div style="color:rgb(0, 0, 0);">Postdoctoral Research Fellow</div><div style="color:rgb(0, 0, 0);">Department of Climate and Space Science and Engineering</div><div style="color:rgb(0, 0, 0);">University of Michigan</div></div></div></div></div>
<div><br></div><div><br></div>
<div id="yahoo_quoted_0560141283" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Sunday, February 25, 2018, 9:58:31 PM EST, Alisson Lucrécio via R-br <r-br@listas.c3sl.ufpr.br> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv0671442735"><div dir="ltr"><div>Caro Colegas,</div><div><br></div><div>Bom dia.</div><div><br></div><div>Tentei usar o pacote FAOSTAT para baixar dados da FAO, mas não funcionar. Eu acho que tem um erro no código arableLand ou domainCode.</div><div><br></div><div>Vocês saberiam o que eu poderia fazer para resolver esse erro?</div><div><br></div><div>Obrigado.</div><div><br></div>-- <br><div class="yiv0671442735gmail_signature"><div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial, sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;background-color:rgb(255,255,255);display:inline;">Alisson Lucrecio da Costa</span></div><div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial, sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;background-color:rgb(255,255,255);display:inline;"><br></span></div><div dir="ltr">--------------------------</div><div dir="ltr"><br></div><div dir="ltr"><span style="line-height:normal;text-indent:0px;float:none;background-color:rgb(255,255,255);display:inline;"><div dir="ltr">library(FAOSTAT)</div><div dir="ltr"><br></div><div dir="ltr">FAOquery.df = data.frame(varName = c("arableLand", "cerealExp", "cerealProd"),</div><div dir="ltr"> domainCode = c("RL", "TP", "QC"),</div><div dir="ltr"> itemCode = c(6621, 1944, 1717),</div><div dir="ltr"> elementCode = c(5110, 5922, 5510),</div><div dir="ltr"> stringsAsFactors = FALSE)</div><div dir="ltr"><br></div><div dir="ltr">## Download the data from FAOSTAT</div><div dir="ltr">FAO.lst = with(FAOquery.df,</div><div dir="ltr"> getFAOtoSYB(name = varName, domainCode = domainCode,</div><div dir="ltr"> itemCode = itemCode, elementCode = elementCode,</div><div dir="ltr"> useCHMT = TRUE, outputFormat = "wide"))</div><div dir="ltr">FAO.lst$entity[, "arableLand"] = as.numeric(FAO.lst$entity[, "arableLand"])</div><div dir="ltr"><br></div><div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-color:initial;float:none;display:inline;">--------------------------</span><br></div></span></div><div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial, sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;background-color:rgb(255,255,255);display:inline;"><br></span></div><div dir="ltr"><span style="line-height:normal;text-indent:0px;float:none;background-color:rgb(255,255,255);display:inline;"><div dir="ltr">library(FAOSTAT)</div><div dir="ltr">> </div><div dir="ltr">> FAOquery.df = data.frame(varName = c("arableLand", "cerealExp", "cerealProd"),</div><div dir="ltr">+ domainCode = c("RL", "TP", "QC"),</div><div dir="ltr">+ itemCode = c(6621, 1944, 1717),</div><div dir="ltr">+ elementCode = c(5110, 5922, 5510),</div><div dir="ltr">+ stringsAsFactors = FALSE)</div><div dir="ltr">> </div><div dir="ltr">> ## Download the data from FAOSTAT</div><div dir="ltr">> FAO.lst = with(FAOquery.df,</div><div dir="ltr">+ getFAOtoSYB(name = varName, domainCode = domainCode,</div><div dir="ltr">+ itemCode = itemCode, elementCode = elementCode,</div><div dir="ltr">+ useCHMT = TRUE, outputFormat = "wide"))</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"> ---------------------------------------- </div><div dir="ltr"> ** FAOSTAT Data Download (3 in Total) ** </div><div dir="ltr"> ---------------------------------------- </div><div dir="ltr"><br></div><div dir="ltr">(1): Downloading variable arableLand ... The specified query has no data, consult FAOSTAT </div><div dir="ltr">(2): Downloading variable cerealExp ... </div><div dir="ltr">NOTE: Multiple China detected in 'Value' sanitization is performed</div><div dir="ltr">OK</div><div dir="ltr">(3): Downloading variable cerealProd ... The specified query has no data, consult FAOSTAT </div><div dir="ltr"><br></div><div dir="ltr"> Number of variables successfully downloaded: 1 out of 3</div><div dir="ltr"><br></div><div dir="ltr">> FAO.lst$entity[, "arableLand"] = as.numeric(FAO.lst$entity[, "arableLand"])</div><div dir="ltr">Error in `[.data.frame`(FAO.lst$entity, , "arableLand") : </div><div dir="ltr"> undefined columns selected</div></span></div></div>
</div></div>_______________________________________________<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.</div>
</div>
</div></div></body></html>