<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="gmail_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-align:start;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-align:start;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="font-variant-numeric:normal;font-variant-east-asian:normal;line-height:normal;text-align:start;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-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;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-align:start;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="font-variant-numeric:normal;font-variant-east-asian:normal;line-height:normal;text-align:start;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>