<html><body><div style="color:#000; background-color:#fff; font-family:garamond, new york, times, serif;font-size:18pt"><div style="font-family: garamond, 'new york', times, serif; font-size: 18pt;"><span style="background-color: transparent; color: rgb(69, 69, 69); font-family: Arial, Helvetica, sans-serif; font-size: 12px;">Oi, estou tentando delimitar os grupos no Cluster analysis, porém a função rect.hclust() extrapola os limites dos retângulos, deixando-os abertos.</span><br></div><div style="font-family: garamond, 'new york', times, serif;"><div style="font-family: 'times new roman', 'new york', times, serif;"><div id="yiv903010025"><div><div style="background-color: rgb(255, 255, 255); font-family: garamond, 'new york', times, serif;"><div style="background-color: transparent; font-family: Arial, Helvetica, sans-serif;"><span style="color: rgb(69, 69, 69); font-size: 12px; font-style: normal; font-family: Arial, Helvetica, sans-serif;"><span
style="color: rgb(69, 69, 69); font-size: 12px; font-family: Arial, Helvetica, sans-serif;">Os dados estão disponíveis na íntegra no endereço<a href="https://www.dropbox.com/s/8vxymeq8wkvhg1l/dados.csv"> </a></span></span><font color="#454545"><span style="font-size: 12px;"><a href="https://www.dropbox.com/s/8vxymeq8wkvhg1l/dados.csv">https://www.dropbox.com/s/8vxymeq8wkvhg1l/dados.csv</a></span></font></div><div style="background-color: transparent;" class="yui_3_7_2_25_1353598101783_78"><font color="#454545"><br></font></div><div style="color: rgb(69, 69, 69); font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: transparent; font-style: normal;"><span><span style="color: rgb(69, 69, 69); font-family: Arial, Helvetica, sans-serif; font-size: 12px;">O script que estou usando segue abaixo.</span></span></div><div style="color: rgb(69, 69, 69); font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color:
transparent; font-style: normal;" class="yui_3_7_2_25_1353598101783_80"><span><span style="color: rgb(69, 69, 69); font-family: Arial, Helvetica, sans-serif; font-size: 12px;" class="yui_3_7_2_25_1353598101783_81"><br></span></span></div><div style="background-color: transparent;" class="yui_3_7_2_25_1353598101783_80"><span><span class="yui_3_7_2_25_1353598101783_81"><font color="#454545"><span style="font-size: 12px;">require(vegan)</span></font><br></span></span></div><div style="background-color: transparent; font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 12px; font-family: Arial, Helvetica, sans-serif;"><font color="#454545"><div style="background-color: transparent;" class="yui_3_7_2_25_1353598101783_82">dados<-read.csv("dados.csv",h=T, row.names=1, sep=";")</div><div style="background-color: transparent;" class="yui_3_7_2_25_1353598101783_82">dados</div></font></span></div><div style="color: rgb(69, 69, 69); font-family:
Arial, Helvetica, sans-serif; font-size: 12px; background-color: transparent; font-style: normal;"><span><span><div style="background-color:transparent;"><span style="background-color: transparent;">dis<-vegdist
(dados, method = "euclidean")</span><br></div><div style="background-color:transparent;"><div style="background-color:transparent;"><font color="#454545" face="Arial, Helvetica, sans-serif"><span style="font-size:12px;">dis</span></font></div><div style="background-color:transparent;"><font color="#454545" face="Arial, Helvetica, sans-serif"><span style="font-size:12px;">range(dis)</span></font></div><div style="background-color:transparent;"><font color="#454545" face="Arial, Helvetica, sans-serif"><span style="font-size:12px;">clust<- hclust(dis, "average")</span></font></div><div style="background-color:transparent;"><font color="#454545" face="Arial, Helvetica, sans-serif"><span style="font-size:12px;">plot(clust, main="Análise de Agrupamento", sub="Ligação pela média", </span></font></div><div style="background-color:transparent;"><font color="#454545" face="Arial, Helvetica, sans-serif"><span style="font-size:12px;">xlab="Locais e
orgãos", ylab="Dissimilaridade
(Distância Euclidiana)")</span></font></div><div style="background-color:transparent;"><font color="#454545" face="Arial, Helvetica, sans-serif"><span style="font-size:12px;">cor(dis, cophenetic(clust))</span></font></div><div style="background-color: transparent; color: rgb(69, 69, 69); font-size: 12px; font-family: Arial, Helvetica, sans-serif; font-style: normal;"><font color="#454545" face="Arial, Helvetica, sans-serif"><span style="font-size:12px;"><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; background-color: transparent;"><font color="#454545" face="Arial, Helvetica, sans-serif"><span style="font-size:12px;">rect.hclust(clust, k=2, border="red")#desenhar dois retângulos</span></font></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; background-color: transparent;"><font color="#454545" face="Arial, Helvetica, sans-serif"><span style="font-size:12px;">x <-
rect.hclust(clust, h=40)#cortar na altura de 40</span></font></div></span></font></div></div><div style="color: rgb(69, 69, 69); font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal;"><br></div><div style="color: rgb(69, 69, 69); font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal;">Se alguém puder me ajudar, desde já agradeço.</div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px;font-style:normal;" class="yui_3_7_2_25_1353598101783_119"><br></div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px;font-style:normal;" class="yui_3_7_2_25_1353598101783_119">Obrigado Augusto Ribas pelas sugestões de postagem.</div></span></span></div><div style="color: rgb(0, 0, 0); font-family: garamond, 'new york', times, serif; font-size: 18pt;"></div><div style="color: rgb(0, 0, 0); font-family: garamond, 'new york', times, serif;
font-size: 18pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: garamond, 'new york', times, serif; font-size: 18pt;"><span style="font-size: 16px;">Maurício Figueira</span><br></div><div style="color: rgb(0, 0, 0); font-family: garamond, 'new york', times, serif; font-size: 18pt;"><font><span style="font-family: garamond, 'new york', times, serif; font-size: 16px;">Mestrando em Engenharia Florestal (UFSM)<br>Herbário do Departamento de Ciências Florestais
(HDCF)</span></font></div><div style="color: rgb(0, 0, 0); font-family: garamond, 'new york', times, serif; font-size: 18pt; background-color: transparent; font-style: normal;"><font><span style="font-family: garamond, 'new york', times, serif; font-size: medium;">Currículo: <a rel="nofollow" target="_blank" href="http://lattes.cnpq.br/1022600405818850">http://lattes.cnpq.br/1022600405818850</a><br><span style="color:rgb(0, 0, 0);">Tel.:(55) 9663-4920 </span></span><br><span style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10px; color: rgb(0, 0, 0); font-weight: bold;"> </span><br></font></div></div></div></div><br><br> </div> </div> </div></body></html>