<font face="trebuchet ms,sans-serif">JC,<br><br>Minha solução não retorna exatamente o que você quer, mas aproxima bem, veja<br><br><span style="font-family: courier new,monospace;">df <- data.frame(gl(n=5, k=6, lab=LETTERS[1:5]), rep(1:6, 5), 1:30)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">names(df) <- c('tra', 'r', 'y')</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">str(df)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">require(reshape)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">cast(df, r~tra, value="y")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">> cast(df, r~tra, value="y")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> r A B C D E</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">1 1 1 7 13 19 25</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">2 2 2 8 14 20 26</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">3 3 3 9 15 21 27</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">4 4 4 10 16 22 28</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">5 5 5 11 17 23 29</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">6 6 6 12 18 24 30</span><br style="font-family: courier new,monospace;">
<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>