Edson,<br><br>Acho que depende da forma como você fornece os dados. Eu fiz assim<br><br><span style="font-family: courier new,monospace;">x <- matrix(rnorm(1000), ncol=5)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">x <- as.data.frame(x)</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;">rcorr(as.matrix(x))</span><br style="font-family: courier new,monospace;"><br>E tive o nome nas colunas. O cbind() que você usa não preserva os nomes, veja os dois casos abaixo<br>
<br><span style="font-family: courier new,monospace;">rcorr(cbind(x$V1,x$V2))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">rcorr(cbind(V1=x$V1, V2=x$V2))</span><br>
<br>Além disso você pode mudar o nome das colunas/linhas de uma matriz com col/rownames().<br><br>À disposição.<br>Walmes.<br><br><br><div class="gmail_quote">Em 24 de março de 2011 11:40, Edson Lira <span dir="ltr"><<a href="mailto:edinhoestat@yahoo.com.br">edinhoestat@yahoo.com.br</a>></span> escreveu:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">
<p class="MsoNormal"><span>Como faço para colocar os nomes das variáveis na rotina abaixo. <br></span></p><p class="MsoNormal"><br><span></span></p><p class="MsoNormal"><span>Faço a rotina para qa correlação:</span></p><p class="MsoNormal">
<span>require(Hmisc)<br></span></p><p class="MsoNormal"><span>rcorr(cbind(corre$prevalência,corre$precipitação,corre$temp_max,</span></p>
<p class="MsoNormal"><span lang="EN-US">+ corre$temp_min)</span></p>
<p class="MsoNormal"><span lang="EN-US">+ ,type=c("pearson"))</span></p>
<p class="MsoNormal"><span lang="EN-US"><span><br></span></span></p><p class="MsoNormal"><span lang="EN-US"><span>Esta saída é gerada. Como faço para colocar os nomes da variável.</span></span></p><p class="MsoNormal"><span lang="EN-US"><span><br>
</span></span></p><p class="MsoNormal"><span lang="EN-US"><span> <span style="font-family: courier,monaco,monospace,sans-serif;"> </span></span></span><span style="font-family: courier,monaco,monospace,sans-serif;">[,1]<span> </span>[,2]<span>
</span>[,3]<span> </span>[,4]</span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>[1,]<span> </span>1.00 -0.04 -0.15 -0.28</span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>[2,]
-0.04<span> </span>1.00 -0.80 -0.41</span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>[3,]
-0.15 -0.80<span> </span>1.00<span> </span>0.67</span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>[4,]
-0.28 -0.41<span> </span>0.67<span> </span>1.00</span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span> </span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>n=
63 </span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span> </span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span> </span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>P</span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span><span> </span>[,1]<span>
</span>[,2]<span> </span>[,3]<span> </span>[,4]<span> </span></span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>[1,]<span> </span>0.7841 0.2516 0.0249</span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>[2,]
0.7841<span> </span>0.0000 0.0010</span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>[3,]
0.2516 0.0000<span> </span>0.0000</span></p>
<p style="font-family: courier,monaco,monospace,sans-serif;" class="MsoNormal"><span>[4,]
0.0249 0.0010 0.0000<span> </span></span></p>
<br><br>Edson Lira<br>
Estatístico<br>
Manaus-Amazonas</td></tr></tbody></table><br>
<br>_______________________________________________<br>
R-br mailing list<br>
<a 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>
<br></blockquote></div><br><br clear="all"><br>-- <br><div style="text-align: left;"><pre><span style="font-family: courier new,monospace;">==========================================================================</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Walmes Marques Zeviani</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Departamento de Estatística - Universidade Federal do Paraná</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">fone: (+55) 41 3361 3573 VoIP: (3361 3600) 1053 1173</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">e-mail: </span><a style="font-family: courier new,monospace;" href="mailto:walmes@ufpr.br" target="_blank">walmes@ufpr.br</a><span style="font-family: courier new,monospace;"> twitter: @walmeszeviani</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">homepage: </span><a style="font-family: courier new,monospace;" href="http://www.leg.ufpr.br/%7Ewalmes" target="_blank">http://www.leg.ufpr.br/~walmes</a><span style="font-family: courier new,monospace;"> linux user number: 531218</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">==========================================================================</span></pre></div><br>