<font face="trebuchet ms,sans-serif">Roberto,<br><br>A reshape apresentada pelo Benilton possui funções bem úteis para restruturação de dados. Com a reshape::melt() também é possível operar, veja<br><br><span style="font-family: courier new,monospace;">require(reshape)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">x <- data.frame(grp=1:10, x2000=rnorm(10), x2001=rnorm(10))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">x <- melt(x, id="grp")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">str(x)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">x$variable <- sapply(strsplit(as.character(x$variable), "x"), function(x) as.numeric(x[2]))</span><br style="font-family: courier new,monospace;">
<br>Envie dúvidas com código mínimo reproduzível (CMR).<br><br>À disposição.<br>Walmes.<br><br clear="all"></font><span style="font-family: trebuchet ms,sans-serif;">==========================================================================</span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">Walmes Marques Zeviani</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)</span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">Departamento de Estatística - Universidade Federal do Paraná</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">fone: (+55) 41 3361 3573</span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">VoIP: (3361 3600) 1053 1173</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">e-mail: <a href="mailto:walmes@ufpr.br" target="_blank">walmes@ufpr.br</a></span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">twitter: @walmeszeviani</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">homepage: <a href="http://www.leg.ufpr.br/%7Ewalmes" target="_blank">http://www.leg.ufpr.br/~walmes</a></span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">linux user number: 531218</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">==========================================================================</span><br>