Olá,<br><br>O que você pode fazer é importar os seus dados num array como my.data  e calcular a distância entre eles passando o metodo euclidean:<br><br>d <- dist(my.data, method = "euclidean")<br><br>Ats,<br>
Juscivânia Mendes<br><br><div class="gmail_quote">2012/5/1 Marcio Leles <span dir="ltr"><<a href="mailto:marcioromarco@gmail.com" target="_blank">marcioromarco@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Calculo de distância euclidiana<br>
    <br>
    Bom dia. Tenho um arquivo que ajusto um modelo de regressão gerando
    três betas para cada árvore.<br>
    <br>
    Tenho casos de ter a medição de mil árvores. Após fazer os ajustes
    passo a ter beta 0, beta 1 e beta 2 para cada árvore.<br>
    <br>
    Gostaria de calcular a distância euclidiana do beta 0 com o beta 0,
    beta 1 com o beta 1 e  beta 2 com o beta 2, entre todas as árvores.<br>
    <br>
    O meu objetivo é ter uma matriz de distância euclidiana entre todos
    os betas de todas as árvores para saber por exemplo qual árvore é
    mais próxima da árvore de número 21.<br>
    <br>
    Abaixo um pedaço do arquivo.<br>
    <br>
    Obrigado pela ajuda.<br>
    <br>
    <table style="border-collapse:collapse;width:294pt" border="0" cellpadding="0" cellspacing="0" width="392">
      <colgroup><col style="width:42pt" width="56" span="7"> </colgroup><tbody>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt;width:42pt" height="17" width="56">ARV</td>
          <td style="width:42pt" width="56">y</td>
          <td style="width:42pt" width="56">x1</td>
          <td style="width:42pt" width="56">x2</td>
          <td style="width:42pt" width="56">coefb_0</td>
          <td style="width:42pt" width="56">coefb_1</td>
          <td style="width:42pt" width="56">coefb_2</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">1</td>
          <td align="right">2,631605</td>
          <td align="right">0,011628</td>
          <td align="right">0,000135</td>
          <td align="right">2,443489</td>
          <td align="right">-7,54249</td>
          <td align="right">6,537685</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">1</td>
          <td align="right">1</td>
          <td align="right">0,151163</td>
          <td align="right">0,02285</td>
          <td align="right">2,443489</td>
          <td align="right">-7,54249</td>
          <td align="right">6,537685</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">1</td>
          <td align="right">0,830123</td>
          <td align="right">0,267442</td>
          <td align="right">0,071525</td>
          <td align="right">2,443489</td>
          <td align="right">-7,54249</td>
          <td align="right">6,537685</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">2</td>
          <td align="right">1,531406</td>
          <td align="right">0,007576</td>
          <td align="right">5,74E-05</td>
          <td align="right">1,341076</td>
          <td align="right">-2,17855</td>
          <td align="right">0,89864</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">2</td>
          <td align="right">1</td>
          <td align="right">0,098485</td>
          <td align="right">0,009699</td>
          <td align="right">1,341076</td>
          <td align="right">-2,17855</td>
          <td align="right">0,89864</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">2</td>
          <td align="right">0,832656</td>
          <td align="right">0,174242</td>
          <td align="right">0,03036</td>
          <td align="right">1,341076</td>
          <td align="right">-2,17855</td>
          <td align="right">0,89864</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">3</td>
          <td align="right">1,645648</td>
          <td align="right">0,007194</td>
          <td align="right">5,18E-05</td>
          <td align="right">1,397167</td>
          <td align="right">-2,65584</td>
          <td align="right">1,382927</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">3</td>
          <td align="right">1</td>
          <td align="right">0,093525</td>
          <td align="right">0,008747</td>
          <td align="right">1,397167</td>
          <td align="right">-2,65584</td>
          <td align="right">1,382927</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">3</td>
          <td align="right">0,808183</td>
          <td align="right">0,165468</td>
          <td align="right">0,02738</td>
          <td align="right">1,397167</td>
          <td align="right">-2,65584</td>
          <td align="right">1,382927</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">4</td>
          <td align="right">2,08642</td>
          <td align="right">0,007042</td>
          <td align="right">4,96E-05</td>
          <td align="right">1,652506</td>
          <td align="right">-3,76968</td>
          <td align="right">2,395018</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">4</td>
          <td align="right">1</td>
          <td align="right">0,091549</td>
          <td align="right">0,008381</td>
          <td align="right">1,652506</td>
          <td align="right">-3,76968</td>
          <td align="right">2,395018</td>
        </tr>
        <tr style="min-height:12.75pt" height="17">
          <td style="min-height:12.75pt" align="right" height="17">4</td>
          <td align="right">0,840278</td>
          <td align="right">0,161972</td>
          <td align="right">0,026235</td>
          <td align="right">1,652506</td>
          <td align="right">-3,76968</td>
          <td align="right">2,395018</td><td><span class="HOEnZb"><font color="#888888">
        </font></span></td></tr><td><span class="HOEnZb"><font color="#888888">
      </font></span></td></tbody><td><span class="HOEnZb"><font color="#888888">
    </font></span></td></table><span class="HOEnZb"><font color="#888888">
    <br>
    <pre cols="72">-- 
Atenciosamente;
Marcio Leles</pre>
  </font></span></div>

<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>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br>