<html><head></head><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1510346106424_183614"><span id="yui_3_16_0_ym19_1_1510346106424_183801">Bom dia caros amigos, estou trabalhando com a base de dados abaixo(somente 6 linhas):<br></span></div><div id="yui_3_16_0_ym19_1_1510346106424_183758"><span><br></span></div><div id="yui_3_16_0_ym19_1_1510346106424_183677" dir="ltr"><span id="yui_3_16_0_ym19_1_1510346106424_183699"> id UF x2002 x2003 x2004 x2005 x2006 x2007 x2008 x2009 x2011 x2012 x2013 x2014<br id="yui_3_16_0_ym19_1_1510346106424_183692">1 1 Acre 192 189 311 311 333 327 338 354 357 381 337 373<br id="yui_3_16_0_ym19_1_1510346106424_183693">2 2 Alagoas 1251 1269 1292 1357 1413 1410 1355 1401 1344 1391 1429 1417<br id="yui_3_16_0_ym19_1_1510346106424_183694">3 3 Amapá 204 198 239 262 252 294 317 299 302 311 332 355<br id="yui_3_16_0_ym19_1_1510346106424_183695">4 4 Amazonas 958 1050 1433 1528 1502 1488 1531 1673 1689 1720 1771 1908<br id="yui_3_16_0_ym19_1_1510346106424_183696">5 5 Bahia 6885 6901 7167 7336 7292 7338 7665 7792 7602 7416 7530 7879<br id="yui_3_16_0_ym19_1_1510346106424_183697">6 6 Ceará 3705 3871 3944 4120 4143 4138 4314 4380 4121 4184 4215 4319<br id="yui_3_16_0_ym19_1_1510346106424_183698"><br></span></div><div id="yui_3_16_0_ym19_1_1510346106424_183673"><span id="yui_3_16_0_ym19_1_1510346106424_184031">Estou usando o reshape para tentar transformar as linhas em colunas, ou seja, cada uma UF seria uma coluna, e assim com as demais</span></div><div><span>Como gostaria que ficasse:</span></div><div><span><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1510346106424_184034"><span id="yui_3_16_0_ym19_1_1510346106424_184033">Acre Alagoas Amapá Amazonas Bahia Ceará ano<br></span></div><div id="yui_3_16_0_ym19_1_1510346106424_183674"><span id="yui_3_16_0_ym19_1_1510346106424_184043">192 1251 3705 2002<br></span></div><div id="yui_3_16_0_ym19_1_1510346106424_184076"><span id="yui_3_16_0_ym19_1_1510346106424_184075">189 1269 3871 2003<br></span></div><div id="yui_3_16_0_ym19_1_1510346106424_184078"><span id="yui_3_16_0_ym19_1_1510346106424_184077">311 1293 3944 2004<br></span></div><div id="yui_3_16_0_ym19_1_1510346106424_184086"><span>... ....</span></div><div id="yui_3_16_0_ym19_1_1510346106424_183628"><div id="yui_3_16_0_ym19_1_1510346106424_184087"> </div><div id="yui_3_16_0_ym19_1_1510346106424_184089">Estou usando a rotina:</div><div id="yui_3_16_0_ym19_1_1510346106424_184091"><br></div><div id="yui_3_16_0_ym19_1_1510346106424_184093"><br></div><div id="yui_3_16_0_ym19_1_1510346106424_184112" dir="ltr">pea<-reshape(pea1, <br id="yui_3_16_0_ym19_1_1510346106424_184141"> varying=c("x2002","x2003","x2004","x2005","x2006","x2007",<br id="yui_3_16_0_ym19_1_1510346106424_184142"> "x2008","x2009","x2011","x2012","x2013","x2014"),<br id="yui_3_16_0_ym19_1_1510346106424_184143"> v.names="Medida",<br id="yui_3_16_0_ym19_1_1510346106424_184144"> timevar="UF",<br id="yui_3_16_0_ym19_1_1510346106424_184145"> times=c("Acre","Alagoas","Amapá","Amazonas","Bahia",<br id="yui_3_16_0_ym19_1_1510346106424_184146"> "Ceará","Distrito Federal","Espírito Santo",<br id="yui_3_16_0_ym19_1_1510346106424_184147"> "Goiás","Maranhão","Mato Grosso","Mato Grosso do Sul",<br id="yui_3_16_0_ym19_1_1510346106424_184148"> "Minas Gerais","Pará","Paraíba","Paraná"," Pernambuco",<br id="yui_3_16_0_ym19_1_1510346106424_184149"> "Piauí","Rio de Janeiro","Rio Grande do Norte",<br id="yui_3_16_0_ym19_1_1510346106424_184150"> "Rio Grande do Sul","Rondônia","Roraima",<br id="yui_3_16_0_ym19_1_1510346106424_184151"> "Santa Catarina","São Paulo","Sergipe","Tocantins"),<br id="yui_3_16_0_ym19_1_1510346106424_184152"> new.row.names=1:27,<br id="yui_3_16_0_ym19_1_1510346106424_184153"> direction="wide")<br id="yui_3_16_0_ym19_1_1510346106424_184154"><br></div><div id="yui_3_16_0_ym19_1_1510346106424_184160">que está me dando o erro:</div><div id="yui_3_16_0_ym19_1_1510346106424_184237"><br></div><div id="yui_3_16_0_ym19_1_1510346106424_184162" dir="ltr">Erro em varying[, i] : número incorreto de dimensões<br id="yui_3_16_0_ym19_1_1510346106424_184195"><br></div><div id="yui_3_16_0_ym19_1_1510346106424_184164">Alguém tem alguma sugesstão?<br></div><div id="yui_3_16_0_ym19_1_1510346106424_184210"><br></div><div id="yui_3_16_0_ym19_1_1510346106424_184219">[ ]'s<br></div></div><div class="signature" id="yui_3_16_0_ym19_1_1510346106424_183630">Prof. Edson Lira, Me <br>Estatístico<br>Manaus-Amazonas</div></div></body></html>