<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Muito obrigado Éder, era exatamente esta a informação que eu queria
extrair,<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
======================================================================
Alexandre dos Santos
Proteção Florestal
IFMT - Instituto Federal de Educação, Ciência e Tecnologia de Mato Grosso
Campus Cáceres
Caixa Postal 244
Avenida dos Ramires, s/n
Bairro: Distrito Industrial
Cáceres - MT CEP: 78.200-000
Fone: (+55) 65 8132-8112 (TIM) (+55) 65 9686-6970 (VIVO)
<a class="moz-txt-link-abbreviated" href="mailto:e-mails:alexandresantosbr@yahoo.com.br">e-mails:alexandresantosbr@yahoo.com.br</a>
<a class="moz-txt-link-abbreviated" href="mailto:alexandre.santos@cas.ifmt.edu.br">alexandre.santos@cas.ifmt.edu.br</a>
Lattes: <a class="moz-txt-link-freetext" href="http://lattes.cnpq.br/1360403201088680">http://lattes.cnpq.br/1360403201088680</a>
======================================================================</pre>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 24/04/2015 09:34, Éder Comunello
wrote:<br>
</div>
<blockquote
cite="mid:CABmC8gnZAA2Tp6wagKctu6N6mrpPL0wwut5_fLR1dN1_J8E0Dg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Alexandre, bom dia!</div>
<div><br>
</div>
<div>Segue uma sugestão,</div>
<div><br>
</div>
<font face="monospace, monospace">### <code r><br>
</font>
<div>
<div><font face="monospace, monospace">require(vegan)</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">{</font></div>
<div><font face="monospace, monospace"> set.seed(765) ###
pra reprodutibilidade!</font></div>
<div><font face="monospace, monospace"> </font></div>
<div><font face="monospace, monospace"> # Matriz das
espécies </font></div>
<div><font face="monospace, monospace"> spdf <-
matrix(NA, 60, 4, dimnames = </font></div>
<div><font face="monospace, monospace">
list(1:60, c("sp1", "sp2", "sp3", "sp4"))) </font></div>
<div><font face="monospace, monospace"> spdf <-
as.data.frame(spdf) </font></div>
<div><font face="monospace, monospace"> </font></div>
<div><font face="monospace, monospace"> # Adicionado
ruído </font></div>
<div><font face="monospace, monospace"> eff <-
sort(rep(1:6, 10)) </font></div>
<div><font face="monospace, monospace"> spdf$sp1 = eff +
rnorm(60, 0, 0.25) </font></div>
<div><font face="monospace, monospace"> spdf$sp2 = eff +
rnorm(60, 0, 0.25) </font></div>
<div><font face="monospace, monospace"> spdf$sp3 = eff +
rnorm(60, 0, 0.25) </font></div>
<div><font face="monospace, monospace"> spdf$sp4 = eff +
rnorm(60, 0, 0.25) </font></div>
<div><font face="monospace, monospace"> </font></div>
<div><font face="monospace, monospace"> # Tratamentos </font></div>
<div><font face="monospace, monospace"> trat <- gl(3,
20, labels = paste("t", 1:3, sep="")) </font></div>
<div><font face="monospace, monospace"> </font></div>
<div><font face="monospace, monospace"> #Repetições </font></div>
<div><font face="monospace, monospace">
rept<-rep(1:20,3)</font></div>
<div><font face="monospace, monospace">}</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">#Juntando tratamentos e
repetições </font></div>
<div><font face="monospace, monospace">trat_r<-paste(trat,rept,sep="_") </font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">pts.spc<-cbind(trat_r,spdf) </font></div>
<div><font face="monospace, monospace">rownames(pts.spc) =
pts.spc[,1] </font></div>
<div><font face="monospace, monospace">pts.spc<-pts.spc[,-(1)] </font></div>
<div><font face="monospace, monospace">head(pts.spc) </font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"># Calcula distância de
bray-curtis entre amostras </font></div>
<div><font face="monospace, monospace">pts.spc.dist <-
vegdist(pts.spc, method = "bray") </font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">#Agrupamento de
comunidades usando o algorítimo average-linkage </font></div>
<div><font face="monospace, monospace">pts.spc.clust <-
hclust(pts.spc.dist, method = "average")</font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"># Diagrama de cluster </font></div>
<div><font face="monospace, monospace">plot(pts.spc.clust,
ylab = "Dissimilaridade") </font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"># --- Dissimilaridade
média --- #</font></div>
<div><font face="monospace, monospace">str(pts.spc.clust)</font></div>
<div><font face="monospace, monospace">res <-
data.frame(lab=pts.spc.clust$labels, height=c(0,
pts.spc.clust$height))</font></div>
<div><font face="monospace, monospace">res$trat <-
as.factor(sub("_.*$", "", res$lab))</font></div>
<div><font face="monospace, monospace">head(res)</font></div>
<div><font face="monospace, monospace">tapply(res$height,
res$trat, mean)</font></div>
<div><font face="monospace, monospace"># t1 t2
t3 </font></div>
<div><font face="monospace, monospace"># 0.01395473 0.03670206
0.13605946 </font></div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace"></code></font></div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature">
<div dir="ltr">Éder Comunello <<a
moz-do-not-send="true"
href="mailto:comunello.eder@gmail.com" target="_blank">c</a><a
moz-do-not-send="true"
href="mailto:omunello.eder@gmail.com" target="_blank">omunello.eder@gmail.com</a>>
<br>
Dourados, MS - [22 16.5'S, 54 49'W]<br>
</div>
</div>
</div>
<br>
<div class="gmail_quote"><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
R-br mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a>
<a class="moz-txt-link-freetext" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a class="moz-txt-link-freetext" href="http://www.leg.ufpr.br/r-br-guia">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>